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

用遗传算法的测试用例最小化
引用本文:马雪英,盛斌奎,叶澄清.用遗传算法的测试用例最小化[J].计算机科学,2007,34(1):285-288.
作者姓名:马雪英  盛斌奎  叶澄清
作者单位:1. 浙江大学计算机学院,杭州,310027;浙江财经学院信息学院,杭州,310012
2. 浙江财经学院信息学院,杭州,310012
3. 浙江大学计算机学院,杭州,310027
基金项目:国家自然科学基金 , 浙江省教育厅资助项目 , 浙江财经学院重大科研课题
摘    要:回归测试就是验证对程序的修改是否迭到了预期的目的,同时检查修改是否损害了程序原有的正常功能。随着程序新版本的不断推出,测试用例集不断扩大,回归测试成本越来越高。测试用例最小化就是从已有的用例集中,找到一个测试运行代价最小的用例子集用于回归测试,并保持原来的测试覆盖率。本文主要研究用遗传算法解决测试用例最小化问题:基于测试历史数据,设计基因编码并构建初始种群;利用测试覆盖率和测试运行代价设计适应度函数;通过遗传算子完成进化过程并找到最优或近似最优解。最后本文给出了对算法进行实例研究的结果。结果表明,本文提出的用例最小化技术能有效缩减回归测试用例集,大幅度降低回归测试费用。

关 键 词:回归测试  测试用例集  测试用例最小化  测试覆盖率  测试运行代价

Test-Suite Minimization Using Genetic Algorithms
MA Xue-Ying,SHENG Bin-Kui,YE Cheng-Qing.Test-Suite Minimization Using Genetic Algorithms[J].Computer Science,2007,34(1):285-288.
Authors:MA Xue-Ying  SHENG Bin-Kui  YE Cheng-Qing
Abstract:Regression testing is an expensive process used to revalidate the modified program. As the software is modified and new test cases are added to the test suite, the test suite grows and the cost of regression testing increases. Regression test-suite minimization techniques attempt to reduce the cost of regression testing by identifying a minimized test-suite that provides the same coverage of the software according to some criterion as the original test-suite. This paper investigates the use of an evolutionary approach, called genetic algorithms, for test-suite minimization. The algorithm designs the gene codes of the individuals and builds the initial population based on the test history, calculates the fitness value of each individual using coverage and cost information, and then selectively breeds the successive generations using genetic operations. This generational process is repeated until a minimized test-suite is founded. Finally, some results of studies of this minimization algorithm are presented. The results show that, genetic algorithms can significantly reduce the size and the cost of the test-suite for regression testing, and achieves good cost-effectiveness.
Keywords:Regression test  Test suite  Test suite minimization  Test coverage  Test execution cost
本文献已被 CNKI 维普 万方数据 等数据库收录!
点击此处可从《计算机科学》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

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