欢迎访问《兵工学报》官方网站,今天是 分享到:

兵工学报 ›› 2006, Vol. 27 ›› Issue (6): 1051-1055.

• 论文 • 上一篇    下一篇

基于使用模型和遗传算法的测试数据自动产生技术

周献中1,孙勇成2,江金龙3   

  1. 1.南京大学工程管理学院,江苏南京210093; 2.防空兵指挥学院,河南郑州450052 3.南京理工大学自动控制系,江苏南京210094
  • 收稿日期:2005-12-20 上线日期:2014-12-25
  • 通讯作者: 周献中

Automatic Test Data Generation Based on Usage Model and tjrenetic Algorithm

ZHOU Xian-zhong1, SUN Yong-cheng2,JIANG Jin-long3   

  1. 1. School of Management and Engineering, Nanjing University, Nanjing 210093, Jiangsu, China; 2. College of Air Defense Forces Command, Zhenzhou 450052,Henan, China; 3. Department of Automation, Nanjing University of Science and Technology, Nanjing 210094, Jiangsu, China
  • Received:2005-12-20 Online:2014-12-25
  • Contact: ZHOU Xian-zhong

摘要: 测试数据的自动产生技术是软件测试的一个重要研究领域,是提高软件测试效率和效果的有效方法。为保证被测对象中实际运行更频繁的部分得到更充分的测试,把使用模型和遗传算法相结合,以整个被测试对象所需测试数据量为优化目标,给出了相应的规划模型,并提出了路径权重和目标路径集的确定方法,设计的适应性函数综合考虑了路径权重、路径覆盖率和路径接近程度三要素。实例证明了模型与方法的合理性及有效性。

关键词: 计算机软件 , 软件测试 , 测试数据 , 使用模型 , 遗传算法

Abstract: Automatic generation technology of test data is an important field of software test, which is an effective method to promote the efficiency and the effect of software test. In order to ensure that the more frequently used features would be tested more thoroughly, usage model and genetic algorithm were integrated together. One programming model was proposed, in which the optimal objective func?tion was defined as the required test data number for whole software test. The methods to decide the weight of path and to select the target path set were presented. Three key elements, 1.e. path weight, path coverage ratio and path approximation level were incorporated for designing the fitness function. An example shows the rationality and validity of the model and the methods.

Key words: computer software , software test , test data , usage model , genetic algorithm

中图分类号: