Strategies for avoiding text fixture smells during software evolution

  • Authors:
  • Michaela Greiler;Andy Zaidman;Arie van Deursen;Margaret-Anne Storey

  • Affiliations:
  • TU Delft, Netherlands;TU Delft, Netherlands;TU Delft, Netherlands;University of Victoria, Canada

  • Venue:
  • Proceedings of the 10th Working Conference on Mining Software Repositories
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

An important challenge in creating automated tests is how to design test fixtures, i.e., the setup code that initializes the system under test before actual automated testing can start. Test designers have to choose between different approaches for the setup, trading off maintenance overhead with slow test execution. Over time, test code quality can erode and test smells can develop, such as the occurrence of overly general fixtures, obscure in-line code and dead fields. In this paper, we investigate how fixture-related test smells evolve over time by analyzing several thousand revisions of five open source systems. Our findings indicate that setup management strategies strongly influence the types of test fixture smells that emerge in code, and that several types of fixture smells often emerge at the same time. Based on this information, we recommend important guidelines for setup strategies, and suggest how tool support can be improved to help in both avoiding the emergence of such smells as well as how to refactor code when test smells do appear.