Automatic Test Smell Detection using Information Retrieval Techniques

Fabio Palomba, Andy Zaidman, Andrea De Lucia

Research output: Chapter in Book/Conference proceedings/Edited volumeConference contributionScientificpeer-review

52 Citations (Scopus)
203 Downloads (Pure)

Abstract

Software testing is a key activity to control the reliability of production code. Unfortunately, the effectiveness of test cases can be threatened by the presence of faults. Recent work showed that static indicators can be exploited to identify testrelated issues. In particular test smells, i.e., sub-optimal design choices applied by developers when implementing test cases, have been shown to be related to test case effectiveness. While some approaches for the automatic detection of test smells have been proposed so far, they generally suffer of poor performance: as a consequence, current detectors cannot properly provide support to developers when diagnosing the quality of test cases. In this paper, we aim at making a step ahead toward the automated detection of test smells by devising a novel textual-based detector, coined TASTE (Textual AnalySis for Test smEll detection), with the aim of evaluating the usefulness of textual analysis for
detecting three test smell types, General Fixture, Eager Test, and Lack of Cohesion of Methods. We evaluate TASTE in an empirical study that involves a manually-built dataset composed of 494 test smell instances belonging to 12 software projects, comparing the capabilities of our detector with those of two code metrics-based techniques proposed by Van Rompaey et al. and Greiler et al.
Our results show that the structural-based detection applied by existing approaches cannot identify most of the test smells in our dataset, while TASTE is up to 44% more effective. Finally, we find that textual and structural approaches can identify different sets of test smells, thereby indicating complementarity.
Original languageEnglish
Title of host publicationProceedings of the International Conference on Software Maintenance and Evolution (ICSME)
Place of PublicationPiscataway, NJ
PublisherIEEE
Pages311-322
Number of pages12
ISBN (Electronic)978-1-5386-7870-1
DOIs
Publication statusPublished - 2018

Bibliographical note

Green Open Access added to TU Delft Institutional Repository ‘You share, we take care!’ – Taverne project https://www.openaccess.nl/en/you-share-we-take-care
Otherwise as indicated in the copyright section: the publisher is the copyright holder of this work and the author uses the Dutch legislation to make this work public.

Keywords

  • Test smells
  • Empirical Studies
  • Mining Software
  • Repositories

Fingerprint

Dive into the research topics of 'Automatic Test Smell Detection using Information Retrieval Techniques'. Together they form a unique fingerprint.

Cite this