首页> 外国专利> UNIT TESTING METHOD BASED ON AUTOMATIC GENERATION OF PATH COVERAGE TEST CASES

UNIT TESTING METHOD BASED ON AUTOMATIC GENERATION OF PATH COVERAGE TEST CASES

机译:基于自动生成路径覆盖测试用例的单元测试方法

摘要

The present invention provides a unit testing method based on automatic generation of path coverage test cases. First, obtain a control flow graph of a program to be tested is obtained. Then, an executable code is executed in the generated control flow graph based on of an automatically generated test case, and meanwhile, a fitness value is calculated and acquired based on of an execution result of the executable code, and a sub-node is selected to continue repeating the above process, until a terminal node in the control flow graph is found, and finally a path marker is generated and the fitness value corresponding to the path is obtained. Then, an automatic test case generation algorithm is executed, and the algorithm constantly automatically generates test cases based on of the returned fitness value, and exits when the path is completely covered, or a set execution is timed out.
机译:本发明提供了一种基于自动生成路径覆盖测试用例的单元测试方法。首先,获得获得要测试的程序的控制流程图。然后,基于自动生成的测试用例在生成的控制流程图中执行可执行代码,同时基于可执行代码的执行结果计算和获取适合度值,并且选择子节点为了继续重复上述过程,直到找到控制流程图中的终端节点,最后产生路径标记,并且获得对应于路径的适合值。然后,执行自动测试用例生成算法,并且算法基于返回的适应值,算法不断自动生成测试用例,并且在路径完全覆盖时退出,或者将执行执行。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号