测试数据生成是组合测试的一个关键问题.文中提出以数理统计为基础的交叉熵方法和以仿生学为基础的粒子群优化算法来生成两两组合测试数据,交叉熵方法采用最优选择概率产生测试数据,而粒子群算法则在可行解空间中搜索具有最优适应值的测试数据.文章给出了交叉熵方法最优选择概率的理论推导,并对两种算法所生成的测试数据集进行约简.将两种算法和现有的贪心方法、代数方法及其它启发式搜索方法进行比较,实验表明交叉熵方法和粒子群算法具有一定的优势和特点.
Abstract The test suite generation is one of key issues of combinatorial testing. This paper uses Cross-Entropy method of statistics and Particle Swarm Optimization from bionics to generate pairwise test data of combinatorial testing. The cross-entropy method used the best selection probability to generate test data and the particle swarm optimization generates test data by searching one with best fitness in a feasible solution. A theoretical method is given for the opti- mal probability selection of the cross-entropy method and a reduction technique is proposed to re- duce the test suite generated by two methods. The empirical results show that the cross-entropy method and the particle swarm optimization have some merits compared with existing greedy al- gorithms, algebra methods and other heuristic search algorithms.