首页> 中文期刊> 《计算机工程与设计》 >基路径覆盖测试用例自动生成方法研究

基路径覆盖测试用例自动生成方法研究

         

摘要

传统基路径覆盖测试用例生成方法通过程序图求出圈复杂度,然后再得出程序的一组基路径,最后分别针对基路径组中的每条路径求出相应的测试用例,不仅繁琐,而且忽视了代码的语义相关性,导致存在路径不可达问题,也就无法生成对应的测试用例.提出了一种新的方法,利用遗传算法动态运行程序,逐渐逼近被测程序的真实逻辑圈复杂度,直接生成满足基路径覆盖测试用例的最小集合,不存在路径不可达问题.实验结果表明,该算法能够有效地生成满足基路径覆盖的测试用例.%In the traditional algorithm of generating testing data for basic path coverage,the ring complex and a group of basis paths are gotten by program chat and then generating testing data of each path,which is not only inefficient but also being with infeasible paths because of ignoring the semantic dependency of codes.A new method is presented,which can dynamically executive the program by using genetic algorithm,gradually approach the real Ring Complex and get basic paths testing data directly without infeasible paths.Results of experiments show that the proposed methods can effectively generate testing data for basic path coverage.

著录项

相似文献

  • 中文文献
  • 外文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号