Automated Static Analysis of Unit Test Code.

Michael Moser, Josef Pichler, Rudolf Ramler

Research output: Contribution to conferencePaperpeer-review

8 Citations (Scopus)

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.

Original languageEnglish
Pages25-28
Number of pages4
DOIs
Publication statusPublished - 20 May 2016
EventIEEE International Conference on Software Analytics, Evolution and Reengineering - Osaka, Japan
Duration: 14 Mar 201618 Mar 2016

Conference

ConferenceIEEE International Conference on Software Analytics, Evolution and Reengineering
Abbreviated titleSANER
Country/TerritoryJapan
CityOsaka
Period14.03.201618.03.2016

Keywords

  • Static analysis
  • Test code
  • Unit testing

Fingerprint

Dive into the research topics of 'Automated Static Analysis of Unit Test Code.'. Together they form a unique fingerprint.

Cite this