计算机工程与应用 ›› 2018, Vol. 54 ›› Issue (20): 48-53.DOI: 10.3778/j.issn.1002-8331.1709-0236

• 理论与研发 • 上一篇    下一篇

基本路径测试用例自动生成的方法研究

孙  晶,李  硕,赵会群   

  1. 北方工业大学 计算机学院,北京 100144
  • 出版日期:2018-10-15 发布日期:2018-10-19

Research on automatic generation of basic path test cases

SUN Jing, LI Shuo, ZHAO Huiqun   

  1. College of Computer Science, North China University of Technology, Beijing 100144, China
  • Online:2018-10-15 Published:2018-10-19

摘要: 基本路径测试是一个传统的代码分析与测试技术,被广泛地应用到复杂软件分析和大型软件逻辑覆盖测试活动中。传统的基本路径测试方法是采用选取满足规约的随机数作为测试用例,没有考虑规约自动提取和规约组合优化。提出一种基于编译技术的条件规约自动提取技术和规约组合优化自动生成测试用例技术,并给出相应的算法。实验结果证明了提出算法的有效性。

关键词: 基本路径测试, 测试用例生成, 编译技术, 规约自动提取, 条件归约组合优化

Abstract: The method of automatic generation is a traditional code analysis and testing technique, widely used in complex software analysis and large software logic coverage test activities. The traditional basic path method is to select the random number that satisfies the statute, as the test case, and does not consider the automatic reduction extraction and reduction combinatorial optimization. In this article, an conditional reduction automatic extraction technology and reduction combinatorial optimization is proposed based on the conditions of compilation technology, and the corresponding algorithm is given. The experimental result shows the effectiveness of the proposed algorithm.

Key words: basic path test, test case generation, compilation technology, automatic reduction extraction, conditional reduction combinatorial optimization