Computer Engineering and Applications ›› 2020, Vol. 56 ›› Issue (18): 238-246.DOI: 10.3778/j.issn.1002-8331.1907-0036

Previous Articles     Next Articles

Research on Automatic Generation of Function Call Path Test Case

SHEN Qing, MU Yongmin   

  1. College of Computer Science, Bejing Information Science and Technology University, Bejing 100101, China
  • Online:2020-09-15 Published:2020-09-10



  1. 北京信息科技大学 计算机学院,北京 100101


Automatic generation of test case is one of the most critical components in software test automation. Symbolic execution, as a program analysis method, is widely used because of its advantages of providing high coverage test case, but path explosion and constraint solving are very problematic. It greatly restricts the application of symbolic execution technology in real-time program analysis. The paper studies the granularity from statement to function, uses the abstract syntax tree and the bytecode sequence to extract the key information and control information of the function to get the function call relation model. The design algorithm generates the function call path (the function call path indicates the program from the beginning to the end). This method not only reduces the number of test paths to alleviate the path explosion problem, but also effectively solves the problem that the existence of function in the control condition makes the symbolic expression difficult to solve. The experimental results show that the method can optimize the test path set and reduce the number of test cases without reducing the coverage.

Key words: function call path, symbolic execution, global test case, test case automatic generation



关键词: 函数调用路径, 符号执行, 全局测试用例, 测试用例自动生成