Abstract
Automated unit tests are an essential software quality assurance measure that is widely used in practice. In many projects, thus, large volumes of test code have co-evolved with the production code throughout development. Like any other code, test code too may contain faults, affecting the effectiveness, reliability and usefulness of the tests. Furthermore, throughout the software system's ongoing development and maintenance phase, the test code too has to be constantly adapted and maintained. To support detecting problems in test code and improving its quality, we implemented 42 static checks for analyzing JUnit tests. These checks encompass best practices for writing unit tests, common issues observed in using xUnit frameworks, and our experiences collected from several years of providing trainings and reviews of test code for industry and in teaching. The checks can be run using the open source analysis tool PMD. In addition to a description of the implemented checks and their rationale, we demonstrate the applicability of using static analysis for test code by analyzing the unit tests of the open source project JFreeChart.
Originalsprache | Englisch |
---|---|
Seiten | 25-28 |
Seitenumfang | 4 |
DOIs | |
Publikationsstatus | Veröffentlicht - 20 Mai 2016 |
Veranstaltung | IEEE International Conference on Software Analytics, Evolution and Reengineering - Osaka, Japan Dauer: 14 März 2016 → 18 März 2016 |
Konferenz
Konferenz | IEEE International Conference on Software Analytics, Evolution and Reengineering |
---|---|
Kurztitel | SANER |
Land/Gebiet | Japan |
Ort | Osaka |
Zeitraum | 14.03.2016 → 18.03.2016 |