Not logged in.

Contribution Details

Type Journal Article
Scope Discipline-based scholarship
Title Scented Since the Beginning: On the Diffuseness of Test Smells in Automatically Generated Test Code
Organization Unit
Authors
  • Giovanni Grano
  • Fabio Palomba
  • Dario Di Nucci
  • Andrea De Lucia
  • Harald C Gall
Item Subtype Original Work
Refereed Yes
Status Published in final form
Language
  • English
Journal Title The Journal of Systems and Software
Publisher Elsevier
Geographical Reach international
ISSN 0164-1212
Volume 156
Page Range 312 - 327
Date 2019
Abstract Text Software testing represents a key software engineering practice to ensure source code quality and reliability. To support developers in this activity and reduce testing effort, several automated unit test generation tools have been proposed. Most of these approaches have the main goal of covering as more branches as possible. While these approaches have good performance, little is still known on the maintainability of the test code they produce, i.e., whether the generated tests have a good code quality and if they do not possibly introduce issues threatening their effectiveness. To bridge this gap, in this paper we study to what extent existing automated test case generation tools produce potentially problematic test code. We consider seven test smells, i.e., suboptimal design choices applied by programmers during the development of test cases, as measure of code quality of the generated tests, and evaluate their diffuseness in the unit test classes automatically generated by three state-of-the-art tools such as Randoop, JTExpert, and Evosuite. Moreover, we investigate whether there are characteristics of test and production code influencing the generation of smelly tests. Our study shows that all the considered tools tend to generate a high quantity of two specific test smell types, i.e., Assertion Roulette and Eager Test, which are those that previous studies showed to negatively impact the reliability of production code. We also discover that test size is correlated with the generation of smelly tests. Based on our findings, we argue that more effective automated generation algorithms that explicitly take into account test code quality should be further investigated and devised.
Digital Object Identifier 10.1016/j.jss.2019.07.016
Other Identification Number merlin-id:17925
PDF File Download from ZORA
Export BibTeX
EP3 XML (ZORA)