Title :
On-the-fly generation of k-path tests for C functions
Author :
Williams, Nicky ; Marre, Bruno ; Mouy, Patricia
Author_Institution :
CEA-Saclay, Gif sur Yvette, France
Abstract :
We propose a novel method, called PathCrawler, for the automatic generation of structural tests satisfying the all-paths criterion or its k-path variant. 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. Our method combines static and dynamic analysis in a way that avoids the disadvantages of both. It is currently being implemented for the C language.
Keywords :
C language; automatic test pattern generation; constraint handling; program compilers; program diagnostics; program testing; C functions; C language; PathCrawler; all-paths criterion; automatic structural test generation; constraint logic programming; dynamic analysis; input variables; instrumented source code; k-path tests; k-path variant; on-the-fly generation; path predicate; program testing; static analysis; symbolic execution path; symbolic path transformation; Automatic testing; Data mining; Flow graphs; Input variables; Instruments; Logic programming; Logic testing; Sequential analysis; Software engineering; Software testing;
Conference_Titel :
Automated Software Engineering, 2004. Proceedings. 19th International Conference on
Print_ISBN :
0-7695-2131-2
DOI :
10.1109/ASE.2004.1342749