Agile Processes in Software Engineering and Extreme Programming

Volume 9 of the series Lecture Notes in Business Information Processing pp 73-82

JExample: Exploiting Dependencies between Tests to Improve Defect Localization

  • Adrian KuhnAffiliated withSoftware Composition Group, University of Bern
  • , Bart Van RompaeyAffiliated withUniversity of Antwerp
  • , Lea HaensenbergerAffiliated withSoftware Composition Group, University of Bern
  • , Oscar NierstraszAffiliated withSoftware Composition Group, University of Bern
  • , Serge DemeyerAffiliated withUniversity of Antwerp
  • , Markus GaelliAffiliated withSoftware Composition Group, University of Bern
  • , Koenraad Van LeemputAffiliated withUniversity of Antwerp

* Final gross prices may vary according to local VAT.

Get Access


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.