Developer-Friendly Test Cases: Generating Understandable Test Names Based on Coverage Improvement

More Info
expand_more

Abstract

TestCube amplifies existing unit tests and creates a new test suite with additional coverage for the source code. The names automatically generated by TestCube do not give any information on the behaviour or the coverage improvement of the amplified test case. In this paper, we present an approach to naming these amplified test cases by representing methods where the coverage is improved. These tests represent the covered methods on source code level and give the developer increased readability and understanding of the amplified test cases. We conducted a research study amongst 16 participants with a background in Computer Science. Participants were asked to indicate their agreement with the original test names, the test names generated by the approach and test names written by experts. The study found that participants strongly disagreed with the original TestCube names, and the names generated by our approach posed a real improvement to their satisfaction with the test names. With a few improvements, the test names generated by the approach will perform as acceptable as the manually written names.