Automatic Test Case Generation

What If Test Code Quality Matters?

Conference Paper (2016)
Author(s)

Fabio Palomba (University of Salerno)

Annibale Panichella (TU Delft - Software Engineering)

Andy Zaidman (TU Delft - Software Engineering)

Rocco Oliveto (University of Molise)

Research Group
Software Engineering
Copyright
© 2016 F. Palomba, A. Panichella, A.E. Zaidman, Rocco Oliveto
DOI related publication
https://doi.org/10.1145/2931037.2931057
More Info
expand_more
Publication Year
2016
Language
English
Copyright
© 2016 F. Palomba, A. Panichella, A.E. Zaidman, Rocco Oliveto
Research Group
Software Engineering
Pages (from-to)
130-141
ISBN (electronic)
978-1-4503-4390-9
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

Test case generation tools that optimize code coverage have been extensively investigated. Recently, researchers have suggested to add other non-coverage criteria, such as mem- ory consumption or readability, to increase the practical use- fulness of generated tests. In this paper, we observe that test code quality metrics, and test cohesion and coupling in particular, are valuable candidates as additional criteria. Indeed, tests with low cohesion and/or high coupling have been shown to have a negative impact on future mainte- nance activities. In an exploratory investigation we show that most generated tests are indeed affected by poor test code quality. For this reason, we incorporate cohesion and coupling metrics into the main loop of search-based algo- rithm for test case generation. Through an empirical study we show that our approach is not only able to generate tests that are more cohesive and less coupled, but can (i) increase branch coverage up to 10% when enough time is given to the search and (ii) result in statistically shorter tests.

Files

PalombaISSTA2016.pdf
(pdf | 0.565 Mb)
License info not available