kirancodes.me
To Proof Maintenance & Beyond!

Modeling readability to improve unit tests

Ermira Daka, José Campos, Gordon Fraser, Jonathan Dorn, Westley Weimer

Abstract

Writing good unit tests can be tedious and error prone, but even once they are written, the job is not done: Developers need to reason about unit tests throughout software development and evolution, in order to diagnose test failures, maintain the tests, and to understand code written by other developers. Unreadable tests are more difficult to maintain and lose some of their value to developers. To overcome this problem, we propose a domain-specific model of unit test readability based on human judgements, and use this model to augment automated unit test generation. The resulting approach can automatically generate test suites with both high coverage and also improved readability. In human studies users prefer our improved tests and are able to answer maintenance questions about them 14% more quickly at the same level of accuracy.

BibTeX
@inproceedings{Daka-al:FSE15,
  author    = {Ermira Daka and
               Jos{\'{e}} Campos and
               Gordon Fraser and
               Jonathan Dorn and
               Westley Weimer},
  title     = {Modeling readability to improve unit tests},
  booktitle = {{ESEC/SIGSOFT} {FSE}},
  pages     = {107--118},
  publisher = {{ACM}},
  year      = {2015},
}

Related papers