JExample: Exploiting Dependencies Between Tests to Improve Defect Localization

TitleJExample: Exploiting Dependencies Between Tests to Improve Defect Localization
Publication TypeConference Paper
Year of Publication2008
AuthorsKuhn, A, Rompaey BV, Hänsenberger L, Nierstrasz O, Demeyer S, Gaelli M, Van Leemput K
EditorAbrahamsson, P
Conference NameProceedings {XP}'08 (9th International Conference on Extreme Programming and Agile Processes in Software Engineering
Date Publishedapr
ISBN Number978-3-540-68254-7

To quickly localize defects, we want our attention to be focussed on relevant failing tests. We propose to improve defect localization by exploiting dependencies between tests, using a JUnit extension called JExample. In a case study, a monolithic white-box test suite for a complex algorithm is refactored into two traditional JUnit style tests and to JExample. Of the three refactorings, JExample reports five times fewer defect locations and slightly better performance (-8-12%), while having similar maintenance characteristics. Compared to the original implementation, JExample greatly improves maintainability due the improved factorization following the accepted test quality guidelines. As such, JExample combines the benefits of test chains with test quality aspects of JUnit style testing.