On the diffusion of test smells and their relationship with test code quality of Java']Java projects

被引:5
|
作者
Martins, Luana [1 ]
Costa, Heitor [2 ]
Machado, Ivan [1 ]
机构
[1] Univ Fed Bahia, Inst Comp, Salvador, BA, Brazil
[2] Univ Fed Lavras, Dept Comp Sci, Lavras, Brazil
关键词
Dataset; Replication study; Structural metrics; Test smells; METRICS;
D O I
10.1002/smr.2532
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Test smells are considered bad practices that can reduce the test code quality, thus harming software testing goals and maintenance activities. Prior studies have investigated the diffusion of test smells and their impact on test code maintainability. However, we cannot directly compare the outcomes of the studies as most of them use customized datasets. In response, we introduced the TSSM (Test Smells and Structural Metrics) dataset, containing test smells detected using the JNose Test tool and structural metrics (test code and production code) calculated with the CK metrics tool of 13,703 open-source Java systems from GitHub. In addition, we perform an empirical study to investigate the relationship between test smells and structural metrics of test code and the relationship between test smells on a large-scale dataset. We split the projects into three clusters to analyze the distribution of test smells, the co-occurrences among test smells, and the correlation of test smells and structural metrics of test code. The ratio of smelly test classes with a specific test smell is similar among the clusters, but we could observe a significant difference in the number of test smells among them. The test smells Sleepy Test, Mystery Guest, and Resource Optimism rarely occur in the three clusters, and the last two are strongly correlated, indicating that those test smells are more severe than others. Our results point out that most test smells have a moderate correlation with high complexity, large size, and coupling of the test code, indicating that they can also negatively affect its quality. To support further studies, we made our dataset publicly available.
引用
收藏
页数:20
相关论文
共 50 条
  • [21] Static code analysis for reducing energy code smells in different loop types: a case study in Java']Java
    Gurung, Ram Prasad
    Porras, Jari
    Koistinaho, Jarrkko
    2024 10TH INTERNATIONAL CONFERENCE ON ICT FOR SUSTAINABILITY, ICT4S 2024, 2024, : 292 - 302
  • [22] An Improved Informative Test Code Approach for Code Writing Problem in Java']Java Programming Learning Assistant System
    Funabiki, Nobuo
    Zaw, Khin Khin
    Mon, Ei Ei
    Kao, Wen-Chung
    ADVANCES IN INTERNET, DATA & WEB TECHNOLOGIES, 2018, 17 : 687 - 698
  • [23] Incorporating Android Code Smells into Java']Java Static Code Metrics for Security Risk Prediction of Android Applications
    Gong, Ai
    Zhong, Yi
    Zou, Weiqin
    Shi, Yangyang
    Fang, Chunrong
    2020 IEEE 20TH INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY, AND SECURITY (QRS 2020), 2020, : 30 - 40
  • [24] On the Nature of Code Cloning in Open-Source Java']Java Projects
    Golubev, Yaroslav
    Bryksin, Timofey
    2021 IEEE 15TH INTERNATIONAL WORKSHOP ON SOFTWARE CLONES, IWSC 2021, 2021, : 22 - 28
  • [25] A large study on the effect of code obfuscation on the quality of java']java code
    Ceccato, Mariano
    Capiluppi, Andrea
    Falcarin, Paolo
    Boldyreff, Cornelia
    EMPIRICAL SOFTWARE ENGINEERING, 2015, 20 (06) : 1486 - 1524
  • [26] On the Diffuseness of Code Technical Debt in Java']Java Projects of the Apache Ecosystem
    Saarimaki, Nyyti
    Lenarduzzi, Valentina
    Taibi, Davide
    2019 IEEE/ACM INTERNATIONAL CONFERENCE ON TECHNICAL DEBT (TECHDEBT 2019), 2019, : 98 - 107
  • [27] VMVM: Unit Test Virtualization for Java']Java
    Bell, Jonathan
    Kaiser, Gail
    36TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE COMPANION 2014), 2014, : 576 - 579
  • [28] Multithreaded Java']Java program test generation
    Edelstein, O
    Farchi, E
    Nir, Y
    Ratsaby, G
    Ur, S
    IBM SYSTEMS JOURNAL, 2002, 41 (01) : 111 - 125
  • [29] College board to add Java']Java test
    不详
    DR DOBBS JOURNAL, 2001, 26 (03): : 18 - 18
  • [30] Automated Test Generation for Java']Java Generics
    Fraser, Gordon
    Arcuri, Andrea
    SOFTWARE QUALITY: MODEL-BASED APPROACHES FOR ADVANCED SOFTWARE AND SYSTEMS ENGINEERING, 2014, 166 : 185 - 198