Automatischer Softwaretest

Authors Philipp Wurm
Title Automatischer Softwaretest
Type diploma thesis
Institution Fachhochschul-Masterstudiengang Software Engineering
School FH OÖ
Month June
Year 2018
SCCH ID# 18063

This thesis deals with the topic of automatic generation of test cases based on source codes which are translated into an abstract syntax tree. The recording of all program paths found in the program flow, which are executed using concrete values, form the basis for test cases that are created after the program path analysis. This task is fulfilled by a software created especially for these analyzes, the Dynamic Symbolic Execution Engine (DSEE). The DSEE integrates already existing components, such as the parser for Java and Pascal, a Symbolic Interpreter and the external library Z3 from Microsoft.

A goal of the work is to check whether the effort is justified to create its own analysis tool like the DSEE, or if the differences between the respective programming languages are too large and thereby the complexity of the implementation and extension of the DSEE increases. For the analysis of the source codes 15 common algorithms were implemented for both Java and Pascal. In addition to the effort analysis of the DSEE implementation, a comparison of the test cases created by the DSEE for Java with Randoop is done, by comparing quality and percentage path coverage of the test cases. The question is clarified if the DSEE is as good as the established solution Randoop. Finally, it is clarified whether there are differences in the path conditions between Java and Pascal. Since the path conditions for both programming languages arise from an abstract syntax tree, the question arises as to whether the difference between the programming languages affects the syntax tree so much, if there is a difference in the syntax tree that has an effect on the found path conditions.

The found path conditions for both languages are compared to obtain a direct comparison of the quality of the Symbolic Interpreter, which is responsible for creating the path conditions. In addition, the results of path coverage between DSEE and Randoop are tabulated to provide a comparison of the amount of tests and path coverage. The results of this document show that the test cases generated by DSEE result in 100% path coverage for all examples, while the results for randoop are between 92,1% and 100,0%. Randoop needs to generate significantly more test cases than DSEE to achieve this path condition coverage.