Test case reduction method based on program behavior slices

Guan Xiaohong,Zheng Qinghua,Liu Ting,Wang Haijun,Yu Lechen,Huang Xiaolong
2016-01-01
Abstract:The invention provides a test case reduction method based on program behavior slices. Under the condition that not all program paths are required to be scanned, a test case set capable of covering all program behaviors is generated, and a state space exploding problem facing the program testing is solved. In a static analyzing stage, control flow and information flow of a program are analyzed according to input program codes, control dependence and data dependence of the program are extracted; potential dependence of the program is calculated according to the control dependence and the data dependence of the program; on the basis of the control dependence, the data dependence and the potential dependence, and combination dependence of the program is built; in a dynamic execution stage, program behavior slices covered by paths and program behavior slices not covered by the paths are calculated according to the execution path and a dependence relation, and according to the program behavior slices which are not covered, symbolic execution is guided to generate paths capable of covering new program slices. Compared with the existing symbolic execution method, effectiveness of the test case set can be guaranteed, and generated test case quantity is remarkably reduced.
What problem does this paper attempt to address?