Improving Readability of Automatically Generated Unit Tests

Doctoral Consortium
Ermira Daka

Unit testing is a commonly applied technique in object-oriented programming, where classes are tested using small, executable tests written as code. It is a laborious, time-consuming, and error prone job, and even after tests are written, it requires developer to maintain them, and to understand code written by other developers. To support developers, unit test can be generated automatically using different testing techniques. However, since algorithms used for test generation are typically guided by structural criteria, generated unit tests are often long and confusing, and with possible negative effect in the test oracle problem and test maintenance. To overcome this problem we investigate the readability of unit test cases. We propose a domain-specific model of unit test readability based on human judgments, and use this model to guide automated unit test generation. The resulting approach can automatically generate test cases with improved readability with the overall objective of reducing the effort for developers to understand these test cases.

Type of Publication: Paper
Conference: PPIG 2015 - 26th Annual Workshop
Publication Year: 2015
Paper #: 11
TitleImproving Readability of Automatically Generated Unit Tests
Publication TypePaper
AuthorsDaka, E
PPIG Workshop: