An Approach for Unit Regression Testing with High Coverage, Shmuel Tyszberowicz
Sprache des Titels:
Regression testing is used to ensure that modifications made to software, such as adding new features or changing existing features, do not worsen (regress) existing software features that should not change. This is essential to guarantee software quality.
A unit test explores a particular aspect of the behavior of the Class Under Test (CUT). One of the most important principles of unit testing is testing the unit in true isolation. But since most CUTs depend on other classes, some of which may not even exist yet, it is difficult to test them in isolation. Mock objects are used to solve this problem, assisting the developer in breaking those dependencies during testing, thus achieving the required isolation.
In this talk I will describe an approach for the automatic generation of unit tests that can be used for regression testing. Our goal is to achieve high coverage of the tested code while testing each unit in isolation.
We accomplish this by creating KeYGenU, a tool-chain that combines the static analysis tool KeY and the dynamic analysis tool GenUTest, exploiting each tool's advantages.
We first run the verification and test-generation tool KeY to generate tests for each path in a given system. With KeY we can obtain the desired high coverage of the code.
However, the generated tests are not isolated, thus running them as they are would result in a high cost of testing.
Hence we use these tests as input to GenUTest, an automatic unit test generator, that turns the tests into truly isolated unit tests by creating mock-object entities.
GenUTest creates the tests by recording actual runs of a system, therefore using this tool alone cannot guarantee high coverage.