首页 | 本学科首页   官方微博 | 高级检索  
     

基于维持种群多样性的测试数据生成算法的研究
引用本文:王建民,蔡媛.基于维持种群多样性的测试数据生成算法的研究[J].计算机研究与发展,2012,49(5):1039-1048.
作者姓名:王建民  蔡媛
作者单位:1. 中山大学信息科学与技术学院 广州 510006
2. 国家数字家庭工程技术研究中心(中山大学) 广州 510006
基金项目:国家自然科学基金项目,广东省自然科学基金项目,广东省科技计划项目,中山大学基本科研业务费专项基金项目
摘    要:测试数据自动化生成技术尝试寻找一个相对小的数据集来满足测试充分性标准,以降低软件测试的成本,提高测试效率.当测试项的数据集大小超过其上限时,算法会使用淘汰算法把差异性较小的测试数据从集合中淘汰掉,把差异性较大的测试数据留下来,以维持种群的多样性.针对此问题,提出一种基于维持种群多样性的演化算法来求解测试数据集,算法利用启发信息迭代地选择一个条件?判定语句作为子目标,通过演化算法生成数据以覆盖目标.在此算法框架内,利用一种新的计算评估值的方法计算数据与测试项的距离信息;以及利用归一的曼哈顿距离计算测试数据差异性,通过淘汰策略把差异性较小的测试数据淘汰掉.在实验中,对14个计算机科学基础算法的基准函数进行了测试,并与现有文献中的测试数据生成方法进行对比,验证了算法有效提高了条件?判定覆盖率,并且减少了测试数据的生成数量,提高了测试性能.

关 键 词:结构化测试  测试数据自动化生成  测试用例  条件/判定覆盖  元启发式搜索技术

Automated Test Data Generation Using Evolutionary Algorithm Based on Maintaining Population Diversity
Wang Jianmin , Cai Yuan.Automated Test Data Generation Using Evolutionary Algorithm Based on Maintaining Population Diversity[J].Journal of Computer Research and Development,2012,49(5):1039-1048.
Authors:Wang Jianmin  Cai Yuan
Affiliation:Wang Jianmin and Cai Yuan(School of Information Science & Technology,Sun Yat-sen University,Guangzhou 510006)(Engineering Research Center of Digital Life(Sun Yat-sen University),Ministry of Education,Guangzhong 510006)
Abstract:The automatic test data generation technology tries to find a relatively small set of test data to satisfy adequacy criterion,in order to reduce testing cost and increase testing efficiency.In this paper,an innovative test data generation algorithm based on maintaining population diversity is proposed,which satisfies condition/decision coverage criterion.This algorithm is based on an extended branch coverage table.Normalized Manhattan distance is employed to calculate the diversity between test data and eliminate the data with lower diversity,to maintain population diversity.Meanwhile,a new approach is introduced to evaluate the fitness values of test data.Then a greedy algorithm is used to reduce the number of test cases.Finally,this paper presents some experiments over a large benchmark composed of fourteen programs that include fundamental and practical aspects of computer science.
Keywords:structural testing  automatic test data generation  test case  condition/decision coverage  meta-heuristic search techniques
本文献已被 CNKI 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号