(en) Creating a piece of software behaving the way the user expects it to behave is a central problem in computer science. Once a system is implemented, it needs to be evaluated in order to verify that it accurately and completely fulfils the initial expectations. Arguably the most commonly applied strategy to achieve this is testing. In testing terminology, we call a test case the combination of a single input for a software component with the expected result of its execution using that input, whereas a test suite refers to a collection of individual test cases. Testing refers to the activity of running a software component with respect to a well-chosen test suite and comparing, for each test case, the output that is produced with the expected result in order to find errors. The difficulty in software testing is due to the complexity of the systems; this complexity has never stopped growing over the years, which renders the need for constant improvement of testing techniques crucial. In particular, a test suite must be constructed in such a way that it will allow the testers to discover as many errors as possible in the program. While it is provably impossible to design test suites in such a way that the program is exercised in all the possibles ways it can possibly be, computer scientists have defined different adequacy criteria which, if satisfied by a given test suite, indicate that the successful execution of this test suite will sufficiently increase the confidence of the testers in the correctness of a program. The hard part of the testing process is constructing a test suite which satisfies the chosen adequacy criteria. This activity can be very time-consuming when performed manually; moreover, the resulting test suites are very large and complex, to such an extent that they can themselves contain errors. There exists therefore a strong interest in automating this process. In this work, we present a testing framework for the logic programming language Mercury able to generate and execute test suites that satisfy a given set of adequacy criteria. The technique we define is based on symbolic execution and constraints, and is able to deal with complex (possibly user-defined) data types. We also show how we can adapt this method in order to generate test suites satisfying sets of adequacy criteria in the context of imperative programming languages using heap-allocated pointer-based data structures.
UnamurEcole doctorale en information et communication
Citations
APA
Chicago
FWB
Degrave, F. (2013). On automatic, constraint-based test-case generation for Mercury and its application to imperative languages. https://hdl.handle.net/2078.5/212155