COMBINATORIAL TESTING

-Test note of “Essential Software Test Design”

2015-09-06

Content

16.1 Coverage
16.2 Combination Strategies
16.3 Input Parameter Modeling
  16.3.1 Structural Input Parameter Modeling
  16.3.2 Functional Input Parameter Modeling
16.4 Conflicts in the Input Parameter Model
16.5 Tools

The aim of combinatorial testing is to provide a solution to combinatorial explosion.

Example:

1. To illustrate combinatorial explosion during test case selection, consider testing the «classical» function triangle(side1, side2, side3).

2. Combinatorial explosion during configuration identification occurs in a similar manner. Consider testing (a part of) a Web based system which should support several:

  • Different operating systems (Windows, MacOS, Unix, Linux),
  • Different browsers (2 versions of Internet Explorer),
  • Different types of data connections (modem, three ADSL speeds, and fiber optical connection).

Figure 16:1: Input parameter model of triangle example.

16.1 Coverage


Top

The ability to vary coverage is a central concept in combinatorial testing. Higher coverage will give you better test quality but also more test cases/configurations. Figure 16:2 shows a subsumption hierarchy of the most commonly used coverage criteria used in combinatorial testing. A coverage criterion X subsumes another coverage criterion Y if and only if 100% coverage with respect to X automatically results in 100 % coverage with respect to Y. Subsumption is indicted in the figure by arrows.

Figure 16:2: Subsumption hierarchy for combination strategy coverage criteria

The simplest form of coverage used in combinatorial testing is 1-wise coverage. It requires each parameter value of every parameter to be included in at least one combination. Figure 16:3 shows a set of combinations that satisfies 1-wise coverage with respect to the model of the triangle problem in Figure 16:1.

Figure 16:3: 1-wise coverage of the triangle example.

A natural extension of 1-wise coverage is 2-wise (pair-wise) coverage. It requires every subcombination of values of any two (pair) of parameters to be included in the set of combinations.

Figure 16:4: 2-wise coverage of the triangle example.

Usually test cases containing more than one invalid value are less effective in detecting faults. The main reason is that code for error handling generally checks the input values one at a time and as soon as the first invalid input value is found the error handler is invoked and the execution is terminated.

Figure 16:6: 2-wise valid coverage of the triangle example.

Figure 16:7: Single error coverage of the triangle example.

The final coverage criterion included in the subsumption hierarchy in Figure 16:2 is called base choice coverage.

  • The first step to satisfy base choice coverage is to identify a base combination. The base combination consists of the base values of each parameter.
  • The tester is free to pick any value as the base value but it is recommended to pick the valid value that is most often used.
  • From the base combination new combinations are derived by altering the values of one parameter at a time such that each value of that parameter is included in at least one combination while keeping the rest of the parameters fixed in their base values.

Figure 16:8 shows a set of combinations that satisfy base choice coverage under the assumption that the base combination is <A2, B2, C2>.

Figure 16:8: Base choice coverage of the triangle example.

16.2 Combination Strategies


Top

Combination strategies are algorithms that select a set of combinations from an input parameter model, such that the selected set of combinations satisfy some coverage criterion. A goal with most combination strategies is to keep the set of combinations as small as possible. This goal is relatively easy to fulfill for simple coverage criteria, such as:

  • 1-wise,
  • base choice,
  • single error,
  • 1-wise valid.

In fact, for all of these coverage criteria it is possible to find minimal sets of combinations. In contrast, for the more complex coverage criteria, such as 2-wise, 2-wise valid and higher, the problem of finding a minimal set of combinations that satisfy the coverage criterion is more difficult.

More than 20 combination strategies exist. Some of the more known are Each Choice (EC) that satisfies 1-wise coverage, Base Choice (BC) that satisfies base choice coverage, Automatic Efficient Test Generator (AETG) ESSENTIAL SOFTWARE TEST DESIGN that satisfies t-wise coverage for t ≥ 2, and Orthogonal Arrays (OA) and In Parameter Order (IPO), both satisfying 2-wise coverage.

16.3 Input Parameter Modeling


Top

One of the key success factors of combinatorial testing is input parameter modeling. In most cases it is possible to define several different models for the same test problem. The contents of the model have a direct impact on the quality of the test cases.

Figure 16:9: Alternative input parameter model for the triangle problem.

16.3.1 Structural Input Parameter Modeling

In structural input parameter modeling, the parameters in the interface of the test object are mapped one-to-one onto parameters in the input parameter model.

The main advantage with the structured approach is that it is a simple task to create the input parameter model.

The drawback with the structural approach is that there are no guarantees that the resulting test cases will take all aspects of the functionality of the test object into account.

16.3.2 Functional Input Parameter Modeling

In functional input parameter modeling it is not necessary to consider each input parameter in isolation and we are not restricted to only include properties of the input parameters in the model. Instead we can model aspects of the functionality and possibly the state of the test object.

The major advantage with the functional approach is that it generally results in test cases with higher quality than test cases from a structural model.

The two drawbacks are that it may be difficult to identify the input parameter model parameters and it may be difficult to translate a combination into actual inputs of the test case since the values of more than one parameter may affect the same input parameter.

16.4 Conflicts in the Input Parameter Model


Top

Input parameter modeling sometimes result in models in which some of the sub-combinations are strange or even meaningless. Any impossible or semantically meaningless subcombination is called a conflict. As an example consider the model in Figure 16:9. The meaning of the sub-combination <A3, B1> is unclear.

Figure 16:10: The steps to replace conflicting combinations while preserving coverage. Conflicts marked in bold.

16.5 Tools


Top

When deciding on tools there are several properties to look for:

  1. Which coverage criteria are supported by the tool.
  2. To what extent can the tool handle confl icts in the input parameter model?
  3. Does the tool support predefi ned combinations?
  4. Can the tool export its results in any known format?
  5. What infrastructure does the tool require?
  6. What does the tool cost?

combinatorial testing, which contains, among other things links to more than 20 different tool suppliers.

PICT is a free Perl-based tool from Microsoft supporting t-wise coverage as well as 2-wise valid coverage, single error coverage, and variable strength coverage. It supports conflicts and pre-selection of test cases. Despite the rather crude user interface this is probably the most powerful tool at the moment.

Telcordia offers a Web commercial, based service in which the user enters an input parameter model in a Web interface and a resulting set of combinations is returned to the user. This service is based on the AETG combination strategy, which means that there is support for t-wise testing for t≥2. There is also support for handling conflicts in the input parameter model.

COMBINATORIAL TESTING的更多相关文章

  1. pict(Pairwise Independent Combinatorial Testing)工具使用

    PICT工具就是在微软公司内部使用的一款成对组合的命令行生成工具,现在已经对外提供,可以在互联网上下载到. 要把输入类型和其对应的参数输入到一个CSV格式(CSV: 以逗号分割的纯文本文件,不带有任何 ...

  2. 组合测试(Combinatorial Test)/配对测试 (pairwise)

    组合测试方法:配对测试实践 实施组合测试 常用的Pairwise工具集:http://www.pairwise.org/tools.asp 成对测试(Pairwise Testing)又称结对测试.两 ...

  3. Pair Testing

    All-Pairs Testing is a test design method to deal with the combinatorics problem of defining test ca ...

  4. 用例设计工具PICT — 输入组合覆盖

    1 成对测试简介 成对测试(Pairwise Testing)又称结对测试.两两测试,是一种正交分析的测试技术.成对组合覆盖这一概念是Mandl于1985年在测试Aad编译程序时提出来的.是当不可能遍 ...

  5. 两两组合覆盖测试用例设计工具:PICT

    两两组合覆盖测试用例设计工具:PICT 2016-08-31 目录 1 成对测试简介2 PICT使用  2.1 安装 PICT  2.2 使用PICT3 PICT算法  3.1 准备阶段  3.2 产 ...

  6. PICT实现组合测试用例(一)

    最近阅读了史亮老师的<软件测试实战:微软技术专家经验总结>一书,其中“测试建模”一章让我受益匪浅.想想以前的测试有多久没有花过心思放在测试用例的设计上了,一直强调“测试思想”的培养也都只是 ...

  7. PICT实现组合测试用例(二)

    上次简单总结了PICT命令的一些用法,这次重新把<软件测试实战>里面有关这一章的内容再总结一次,以巩固理解. 组合测试的概念 组合测试(combinatorial testing)是一种测 ...

  8. Content of "Essential Software Test Design"

    Content of "Essential Software Test Design" 2015-11-16 PART I 7 TEST DESIGN TECHNIQUES: AN ...

  9. 组合覆盖与PICT的使用

    组合覆盖法是一种有效减少测试用例个数的测试用例设计方法.根据覆盖程度的不同,可以分为单因素覆盖.成对组合覆盖.三三组合覆盖等.其中又以成对组合覆盖最常用. 关于组合覆盖的更多内容,参考:http:// ...

随机推荐

  1. mongodb的几种启动方法

    1 mongodb的几种启动方法   启动Mongodb服务有两种方式,前台启动或者Daemon方式启动,前者启动会需要保持当前Session不能被关闭,后者可以作为系统的fork进程执行,下文中的p ...

  2. HDU-1421 搬寝室【dp】

    题目链接:https://vjudge.net/contest/214662#problem/E 题目大意:                                               ...

  3. wireshark实战之局域网抓包分析

    Wireshark.它是一款本地监听数据的大杀器,弊端是只能监听本地的数据,有什么办法可以让局域网中的流量都从本机走呢? 第一ARP嗅探,劫持网关,再本地抓包. 第二交换机镜像端口,在路由或者交换机处 ...

  4. Java设计模式从精通到入门二 装饰器模式

    介绍 ​ 我尽量用最少的语言解释总结: ​ Java23种设计模式之一,属于结构型模式,允许向一个现有的对象添加新的功能,不改变其结构. 应用实例: ​ 给英雄联盟种的射手,添加不同的装备.先装备攻速 ...

  5. git使用经验for windows

    一.本地同步fork的最新版本 二.git命令 一.本地同步fork的最新版本 ①打开Git CMD工具,进入git的主目录 ②使用 git remote -v 查看fork的远程仓库地址 origi ...

  6. Linux服务器下Nginx与Apache共存

    解决思路: 将nginx作为代理服务器和web服务器使用,nginx监听80端口,Apache监听除80以外的端口,我这暂时使用8080端口. nginx.conf 位置:/etc/nginx/ngi ...

  7. 4558: [JLoi2016]方

    4558: [JLoi2016]方 https://lydsy.com/JudgeOnline/problem.php?id=4558 分析: 容斥原理+各种神奇的计数. 如果没有被删除了的点的话,直 ...

  8. BZOJ.2177.曼哈顿最小生成树(Kruskal)

    \(Solution\) 参考 对于每个点,向唯一有可能与它形成MST的8个点连边,由于是双向单边,所以每个点最多连出4条边(证明见blog) 怎么找到一个区域内最近的点? 只考虑y轴右侧45°的区域 ...

  9. 虚拟机性能监控与故障处理工具------JDK的命令行工具

    ①jps:虚拟机进程状况工具 功能:列出正在运行的虚拟机进程,并显示1.虚拟机执行主类名称以及2.这些进程的本地虚拟机唯一ID(LVMID). 使用频率最高的JDK命令行工具,其他的JDK工具大多需要 ...

  10. 将java项目传输到centos7服务端

    http://www.xdowns.com/so.asp?keyword=flashfxp 下载flashfxp之后进行一系列配置即可 https://cloud.baidu.com/?from=co ...