测试用例设计之二——Pairwise Testing——成对测试

1. 与正交分解法、等价类分析、边界值分析、错误推测发、判定表因果图、基于模型测试、基于风险模型、场景分析方法一样,Pairwise Testing也是一种测试用例分析方法。

2. Pairwise的概念:

     Pairwise testing techniques reduce the nummer of test cases by testing all pairs of variables rather than attempting to test all of the combinations for all the values for all the variables.

    Most field faults were caused by either incorrect single values or by an interaction of pairs of values." If that's generally correct, we ought to focus our testing on the risk of single-mode and double-mode faults. We can get excellent coverage by choosing tests such that 1) each state of each variable is tested, and 2) each variable in each of its states is tested in a pair with every other variable in each of its states. This is called pairwise testing or all-pairs testing.

    成对测试是一种有效的测试用例生成技术,通过对测试变量的所有维度及值的组合,避免穷举测试所有维度的所有值及其组合来减少测试用例量。                      

3. 历史:

    Mandl于1985年在测试AA的编译程序时提出的。Cohen等人应用程度组合覆盖测试技术对Unix中的“Sort”命令进行了测试。测试结果表明覆盖率高达90%以上。

4.  可使用方向:

     在测试用例设计过程中,有时会遇到很多变量进行组合的情况,两个或更多变量时,可能的组合会达到很大的量,对测试用例设计来说,利弊显而易见。

5. 原理:

   

   




你可能感兴趣的:(测试技术)