Assisting developers in the creation and maintenance of unit tests

Date
2018
Journal Title
Journal ISSN
Volume Title
Publisher
University of Delaware
Abstract
Testing is one of the primary methods developers use to evaluate and improve the quality of software. To test software, developers must perform two activities: test creation and test maintenance. The first activity, test creation, consists of developing and implementing a test suite—the set of test cases that will be used to evaluate the software. The second activity, test maintenance, consists of understanding and modifying existing test cases. To support these two testing activities, researchers have proposed different techniques. For example, automated test generation techniques can help developers create tests. Code summarization techniques can summarize tests and generate comments for helping developers understand existing test cases. Despite decades of work devoted to reducing its cost, testing remains an expensive and laborious activity. In the future, these costs are likely to remain high, as the size and complexity of software increases. Therefore, additional techniques for reducing the costs of creating new tests as well as maintaining existing tests are necessary. ☐ This dissertation focuses on helping developers reduce the cost of testing by leveraging test names. A test name is one of the most potentially useful sources of information for a test. In order to reduce the cost of test creation, I developed a new technique that uses test names as specifications to generate test templates. It can save time and lower the cognitive barrier for writing tests. During maintenance, accurate and meaningful test names are desirable because they document tests and facilitate comprehension tasks. Despite the benefits of being accurate and meaningful, test names in a real test suite often fall short of this goal. Therefore, I developed two techniques, that are based on different ideas and applicable for different scopes, for automatically generating test names from existing test bodies. They help reduce maintenance costs by simplifying the comprehension task of understanding a test.
Description
Keywords
Citation