Dynamic Unit Test Extraction Via Time Travel Debugging for Test Cost Reduction

Compared to system tests, unit tests execute faster and allow more precise fault localisation. Hence, it can be beneficial to automatically extract unit tests and displace associated system tests. However, the extraction process may encounter challenges such as the identification of relevant test objectives, scalability issues, and future maintainability of serialized state. % To address these challenges, we exploit time travel debugging for efficient and accurate reconstruction of object states and use differential analysis of code coverage data. This allows us to extract code-only unit tests with a feasible overhead. The extracted unit tests mimic relevant parts of the system tests and, by displacing the latter in early testing stages, save resources. Our preliminary evaluation indicates large potentials for test cost reduction and high practical acceptance.

[1]  Thomas Bach,et al.  Effects of an Economic Approach for Test Case Selection and Reduction for a Large Industrial Project , 2018, 2018 IEEE International Conference on Software Testing, Verification and Validation Workshops (ICSTW).

[2]  Matthew B. Dwyer,et al.  Carving and Replaying Differential Unit Test Cases from System Test Cases , 2009, IEEE Transactions on Software Engineering.

[3]  Jan Vitek,et al.  Tests from traces: automated unit test extraction for R , 2018, ISSTA.

[4]  Hovy Christian,et al.  Towards Automatic and Flexible Unit Test Generation for Legacy HPC Code , 2016 .

[5]  J. Engblom,et al.  A review of reverse debugging , 2012, Proceedings of the 2012 System, Software, SoC and Silicon Debug Conference.

[6]  Michael D. Ernst,et al.  Automatic test factoring for java , 2005, ASE '05.

[7]  Thomas Bach,et al.  Coverage-Based Reduction of Test Execution Time: Lessons from a Very Large Industrial Project , 2017, 2017 IEEE International Conference on Software Testing, Verification and Validation Workshops (ICSTW).