本文构建了一个基于区间集的组合覆盖测试模型并提出了一个基于区间组合的测试用例生成算法(TCGIC).TCGIC算法用符号执行方法收集程序路径的约束条件,寻找相互关联的输入参数;借鉴组合覆盖测试的方法,构建解区间组合树,并选用深度优先策略或其他组合覆盖策略,获得输入参数的区间组合的集合;运用区间运算的方法,把每一个区间组合代入到程序路径的约束条件中,判断区间组合上程序路径的可达性;选用相应的用例生成策略,在路径可达的区间组合上生成测试用例.
In this paper,we construct a combinatorial testing model based on interval sets and present TCGIC,a test case generation algorithm based on interval combination.TCGIC exploits symbolic execution to collect constraint conditions of program path and to look for input parameters associated with each other,applies combinatorial coverage strategies to searching interval combination set of correlative input parameters in the light of combinatorial coverage testing,uses interval computation to put every interval combination into constraint conditions of program path in order to identify the feasibility of program path,and finally chooses corresponding strategies of test case generation to generate test case from the interval combination of feasible path.Our experiment results show that the algorithm is effective.