Automatic Test Smell Detection using Information Retrieval Techniques

Conference Paper (2018)
Author(s)

F. Palomba (Universitat Zurich)

Andy Zaidman (TU Delft - Software Engineering)

Andrea De Lucia (University of Salerno)

Research Group
Software Engineering
Copyright
© 2018 F. Palomba, A.E. Zaidman, Andrea De Lucia
DOI related publication
https://doi.org/10.1109/ICSME.2018.00040
More Info
expand_more
Publication Year
2018
Language
English
Copyright
© 2018 F. Palomba, A.E. Zaidman, Andrea De Lucia
Research Group
Software Engineering
Pages (from-to)
311-322
ISBN (electronic)
978-1-5386-7870-1
Reuse Rights

Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.

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.

Files

Automatic_Test_Smell_Detection... (pdf)
(pdf | 0.311 Mb)
- Embargo expired in 04-07-2022
License info not available