摘要
采用遗传算法生成回归测试数据近年来得到普遍关注,该方法高效生成测试数据的前提是合理利用已有的测试数据形成初始进化种群,并设计有针对性的遗传操作.但是,到目前为止,相关的研究成果尚不多见.文中研究采用遗传算法生成回归测试数据以覆盖目标路径时,已有测试数据的利用问题,提出一种新的回归测试数据进化生成方法.该方法根据已有测试数据穿越的路径与目标路径的相似度,选择合适的测试数据,作为初始进化种群的部分个体.进一步,根据已有测试数据穿越的路径与目标路径不相同子路径的节点对应的输入分量,确定对进化个体实施遗传操作的位置.理论分析表明,所提方法可以有效提高测试数据生成效率.将所提方法应用于典型基准和工业程序的测试,并与已有方法比较,实验结果证实了所提方法的优越性.
Generating regression test data using genetic algorithms has obtained widespread attention in recent years. The premises of this method on effectively generating test data are appropriately utilizing existing test data to form the initial population, and designing some targe- ting genetic operations. However, the related work has been inadequate up to date. In this paper, we investigated the problem of utilizing existing test date when generating regression test data using genetic algorithms to cover a target path, and presented a novel method of generating regression test data. In this method, appropriate test data are selected as a part of individuals of the initial population according to the similarity between the path traversed by an existing test datum and the target one. Further, the position of performing genetic operations on individuals is determined based on the input variables corresponding to the nodes that belong to the sub-path where the path traversed by existing test data is different from the target one. The theoretical analysis shows that the proposed method can effectively improve the efficiency in generating test data. We applied the proposed method to some typical benchmark and industrial programs, and compared it with previous ones. The experimental results confirm the advantage of the proposed algorithm.
出处
《计算机学报》
EI
CSCD
北大核心
2014年第3期489-499,共11页
Chinese Journal of Computers
基金
国家自然科学基金(61375067
61075061)
江苏省自然科学基金(BK2012566)
高等学校博士学科点专项科研基金(博士生导师类)(20100095110006)资助~~