zoukankan      html  css  js  c++  java
  • Independence独立

    Independence refers to the degree to which each test case stands alone. That is, does the success or failure of one test case depend on another, and if so what is the impact of the sequence of execution? This is an issue because it may be necessary or desirable to execute less than all of the test cases within a given execution cycle; if dependencies exist, then planning the order of execution becomes more complex.

    独立性是指每一个测试案例所代表的程度。也就是说,一个测试用例的成功或失败取决于另一个测试用例,如果是这样的话,执行序列的影响是什么?这是一个问题,因为它可能是必要的或可取的执行小于所有的测试用例在一个给定的执行周期;如果依赖存在,然后规划的执行顺序变得更加复杂。

    Independent data

    数据独立

    Independence is most easily accomplished if each test case verifies at least one feature or function by itself and without reference to other tests. This can be a problem where the state of the data is key to the test. For example, a test case that exercises the delete capability of a record in a file should not depend on a previous test case that creates the record; otherwise, if the previous test is not executed, or fails to execute properly, then the later test will also fail because the record will not be available for deletion. In this case, either the beginning state of the database should contain the necessary record, or the test that deletes the record should first add it.

    如果每个测试用例本身并不参考其他试验验证的至少一个特征或功能,独立性是最容易达成的。当数据的状态是测试的关键时将会存在问题。例如,一个测试用例,行使在一个文件中的记录的删除功能不应该依赖于以前的测试情况下,创建的记录;否则,如果不执行前面的测试,或未能正确执行,然后稍后测试失败因为记录不可删除。在这种情况下,数据库的任一开始状态应包含必要的记录,或者说,删除该记录应该首先添加试验。

    Independent context

    上下文独立

    Independence is also needed where application context is concerned. For example, one test is expected to commence at a particular location, but it relies on a previous test to navigate through the application to that point.

    还需要独立下应用程序上下文有关。例如,一个测试预计开始在特定位置处,但它依赖于以前的测试来浏览应用到该点。

    Result independence 

    结果独立

    Again, if the first test is not successfully executed, the second test could fail for the wrong reason. Your test framework should give consideration to selecting common entry and exit points to areas of the application. and assuring that related tests begin and end at one of them.

    再次,如果第一次测试没有成功执行,二次测试可能会失败的原因。你的测试框架应该考虑选择一般的入口和退出点到应用程序的区域。并确保相关测试开始和结束在其中的一个。

    It is also risky for one test case to depend on the successful result of another. For example, a test case that does not expect an error message should provide assurance that, in fact, no message was issued. If one is found, steps should be added to clear the message. Otherwise, the next test case may expect the application to be ready for input when in fact it is in an error status.

    危险一个测试用例依赖另一个成功结果例如一个测试用例期望错误消息提供保证事实上没有消息发出如果一个被发现,步骤应该被添加到明确的信息。否则,下一个测试案例可以期望该应用程序在错误状态时准备好输入。

     

    If proper attention is paid to independence, the test execution cycle will be greatly simplified. In those cases where total independence is not possible or desirable, then be certain that the dependencies are well documented; the sequence, for example, might be incorporated into the naming conventions for test cases (ADD RECORD 01,ADD RECORD 02, etc.).

    如果适当重视独立,测试执行周期将大大简化。在这些情况下,完全独立是不可能的或希望的,那么可以肯定的依赖关系是有据可查;的序列,例如,可能会被并入的命名约定测试用例(ADD记录01,ADD记录02等)。

  • 相关阅读:
    微信扫码签到系统asp源码2.0示例
    asp代码写的,微信会员报名转发分享带上下级和邀约人关系并且能微信支付asp编号的
    asp微信支付代码v4.1无需证书版,带回调入库的asp支付源码
    asp微信支付源码完整版下载,带证书文件post_url.aspx和post_url.aspx.cs源码下载
    asp群发微信公众号模板消息代码
    asp生成带参数的二维码并合成推广海报图片,asp合并合成推广海报图片asp代码
    asp微信公众号支付回调参数入库demo详细示例
    asp实现微信jssdk分享,静态页html实现jssdk微信分享
    asp微信支付企业付款功能代码下载
    asp实现微信客服消息群发,asp代码写的
  • 原文地址:https://www.cnblogs.com/Ann-L/p/4762877.html
Copyright © 2011-2022 走看看