On-the-fly generation of structural tests for C functions

msra(2003)

引用 23|浏览6
暂无评分
摘要
We propose a method for the automatic generation of structural tests satisfying the all-paths criterion. The control flow graph is not constructed at the start of the test generation process, but discovered "on-the-fly". The source code is instrumented so as to recover the symbolic execution path each time that the program under test is executed. This code is first executed using inputs arbitrarily selected from the input domain. The resulting symbolic path is transformed into a path predicate by projection of the conditions onto the input variables. The next test is obtained by using constraint logic programming to find new input values outside the domain of the path which is already covered. The instrumented code is then executed on this test and so on, until all feasible paths have been covered We thus only analyse paths which we know to be feasible and loops are only treated in their unrolled form. As a result, instead of a more global analysis of the source code which may be approximate, we perform an accurate local analysis for each path. The problems of variable renaming and the treatment of aliases, as well as the complexity of the expressions treated, are considerably reduced, thereby facilitating the detection of unsatisfiable constraints. Our approach is applicable to all imperative languages and is currently being implemented for C.
更多
查看译文
关键词
automatic test generation,constraint logic programming,: structural software testing,all-paths,software testing,control flow graph,global analysis,satisfiability,source code,structural testing
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要