Contributions to program- and specification-based test data generation

University dissertation from Linköping : Linköpings universitet

Abstract: Software testing is complex and time consuming. One way to reduce testing effort is to automatically generate test data. In the first part of this thesis we consider a framework by Gupta et al. for generating tests from programs. In short, their approach consists of a branch predicate collector, which derives a system of linear inequalities representing an approximation of the branch predicates for a given path in the program. This system is solved using their constraint solver called the Unified Numerical Approach (UNA). In this thesis we show that in contrast to traditional optimization methods the UNA is not bounded by the size of the solved system. Instead it depends on how input is composed. That is, even for very simple systems consisting of one variable we can easily get more than a thousand iterations. We will also give a formal proof that UNA does not always find a mixed integer solution when there is one. Finally, we suggest using some traditional optimization method instead, like the simplex method in combination with branch-andbound and/or a cutting-plane algorithm as a constraint solver.In the second part we study a specification-based approach for generation of software tests developed by Meudec. Briefly, tests are generated by an automatic partitioning strategy based on partition rules. An important step in the process is to reduce the number of generated subdomains and find a minimal partition. However, we have found that Meudec-s algorithm does not always produce a minimal partition. In this work we present an alternative solution to the minimal partition problem by formulating it as an integer programming problem. By doing so, we can use well known optimization methods to solve this problem.A more efficient way to derive a minimal partition would be using Meudec-s conjectured two-step reduction approach: vertex merging and minimal path coverage. Failing to find a general solution to either of the steps, Meudec abandoned this approach. However, in this work we present an algorithm based on partial expansion of the partition graph for solving the first step. Furthermore, our work in partial expansion has led to new results: we have determined an upper bound on the size of a minimal partition. In turn, this has led to a stronger definition of our current minimal partition algorithm. In some special cases we can also determine lower bounds. 

  This dissertation MIGHT be available in PDF-format. Check this page to see if it is available for download.