arrow
Return

Rotten green tests in Java, Pharo and Python An empirical study

delete2021-09-24
delete1
delete
OA
AI
V
Vincent Aranega *
J
Julien Delplanque
M
Matías Martínez
A
Andrew P. Black
S
Sté́phane Ducasse
A
Anne Etien
C
Christopher Fuhrman
G
Guillermo Polito
DOI:10.1007/s10664-021-10016-2delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Rotten Green Tests are tests that pass, but not because the assertions they contain are true: a rotten test passes because some or all of its assertions are not actually executed. The presence of a rotten green test is a test smell, and a bad one, because the existence of a test gives us false confidence that the code under test is valid, when in fact that code may not have been tested at all. This article reports on an empirical evaluation of the tests in a corpus of projects found in the wild. We selected approximately one hundred mature projects written in each of Java, Pharo, and Python. We looked for rotten green tests in each project, taking into account test helper methods, inherited helpers, and trait composition. Previous work has shown the presence of rotten green tests in Pharo projects; the results reported here show that they are also present in Java and Python projects, and that they fall into similar categories. Furthermore, we found code bugs that were hidden by rotten tests in Pharo and Python. We also discuss two test smells -missed fail and missed skip -that arise from the misuse of testing frameworks, and which we observed in tests written in all three languages.
Keywords:
Testing
Rotten Green Tests
Empirical study
Software quality

Journal

Empirical Software Engineering cover
Empirical Software Engineering
IF:
3.6
Papers:
2.0K
Citations:
5.3K

Organization

C
centre national de la recherche scientifique (cnrs)
Scholars:
24.5W
Papers: 18.2W
Citations: 279
I
Inria
Scholars:
3.5K
Papers: 2.5K
Citations: 343
C
centrale lille
Scholars:
1.9K
Papers: 1.5K
Citations: 0
U
universite de lille
Scholars:
2.7W
Papers: 2.0W
Citations: 15
researcher View more organizations