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

被引:1
|
作者
Aranega, Vincent [1 ]
Delplanque, Julien [1 ]
Martinez, Matias [2 ]
Black, Andrew P. [3 ]
Ducasse, Stephane [1 ]
Etien, Anne [1 ]
Fuhrman, Christopher [4 ]
Polito, Guillermo [1 ]
机构
[1] Univ Lille, CNRS, Cent Lille, INRIA,UMR 9189,CRIStAL, F-59000 Lille, France
[2] Univ Polytech Hauts France, LAMIH UMR CNRS 8201, Valenciennes, France
[3] Portland State Univ, Dept Comp Sci, Portland, OR 97207 USA
[4] Ecole Technol Super, Montreal, PQ, Canada
关键词
Testing; Rotten Green Tests; Empirical study; Software quality;
D O I
10.1007/s10664-021-10016-2
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页数:41
相关论文
共 50 条
  • [1] Rotten green tests in Java, Pharo and Python: An empirical study
    Aranega, Vincent
    Delplanque, Julien
    Martinez, Matias
    Black, Andrew P.
    Ducasse, Stéphane
    Etien, Anne
    Fuhrman, Christopher
    Polito, Guillermo
    Empirical Software Engineering, 2021, 26 (06)
  • [2] Rotten green tests in Java, Pharo and PythonAn empirical study
    Vincent Aranega
    Julien Delplanque
    Matias Martinez
    Andrew P. Black
    Stéphane Ducasse
    Anne Etien
    Christopher Fuhrman
    Guillermo Polito
    Empirical Software Engineering, 2021, 26
  • [3] Method Chaining Redux: An Empirical Study of Method Chaining in Java']Java, Kotlin, and Python']Python
    Keshk, Ali M.
    Dyer, Robert
    2023 IEEE/ACM 20TH INTERNATIONAL CONFERENCE ON MINING SOFTWARE REPOSITORIES, MSR, 2023, : 546 - 557
  • [4] Scripting with Java']Java & Python']Python
    Rempt, B
    DR DOBBS JOURNAL, 2001, 26 (10): : 56 - +
  • [5] Fixing the Sorting Algorithm for Android, Java']Java and Python']Python
    de Gouw, Stijn
    de Boer, Frank
    ERCIM NEWS, 2015, (102): : 45 - 45
  • [6] Examining JPython']Python - A Java']Java test engine puts Python']Python to the test
    Angell, K
    DR DOBBS JOURNAL, 1999, 24 (04): : 78 - +
  • [7] Do Comments follow Commenting Conventions? A Case Study in Java']Java and Python']Python
    Rani, Pooja
    Abukar, Suada
    Stulova, Nataliia
    Bergel, Alexandre
    Nierstrasz, Oscar
    IEEE 21ST INTERNATIONAL WORKING CONFERENCE ON SOURCE CODE ANALYSIS AND MANIPULATION (SCAM 2021), 2021, : 165 - 169
  • [8] Blindspots in Python']Python and Java']Java APIs Result in Vulnerable Code
    Brun, Yuriy
    Lin, Tian
    Somerville, Jessie Elise
    Myers, Elisha M.
    Ebner, Natalie
    ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2023, 32 (03)
  • [9] A Statistical Comparison of Java']Java and Python']Python Software Metric Properties
    Destefanis, Giuseppe
    Ortu, Marco
    Porru, Simone
    Swift, Stephen
    Marchesi, Michele
    PROCEEDINGS OF 2016 IEEE/ACM 7TH INTERNATIONAL WORKSHOP ON EMERGING TRENDS IN SOFTWARE METRICS (WETSOM), 2016, : 22 - 28
  • [10] An Empirical Study of Flaky Tests in Python']Python
    Gruber, Martin
    Lukasczyk, Stephan
    Krois, Florian
    Fraser, Gordon
    2021 14TH IEEE CONFERENCE ON SOFTWARE TESTING, VERIFICATION AND VALIDATION (ICST 2021), 2021, : 148 - 158