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 条
  • [41] A Study of Potential Code Borrowing and License Violations in Java']Java Projects on GitHub
    Golubev, Yaroslav
    Eliseeva, Maria
    Povarov, Nikita
    Bryksin, Timofey
    2020 IEEE/ACM 17TH INTERNATIONAL CONFERENCE ON MINING SOFTWARE REPOSITORIES, MSR, 2020, : 54 - 64
  • [42] Test-First Java']Java Concurrency for the Classroom
    Ricken, Mathias
    Cartwright, Robert
    SIGCSE 10: PROCEEDINGS OF THE 41ST ACM TECHNICAL SYMPOSIUM ON COMPUTER SCIENCE EDUCATION, 2010, : 219 - 223
  • [43] Answer Code Validation Program with Test Data Generation for Code Writing Problem in Java']Java Programming Learning Assistant System
    Wai, Khaing Hsu
    Funabiki, Nobuo
    Aung, Soe Thandar
    Lu, Xiqin
    Jing, Yanhui
    Kyaw, Htoo Htoo Sandi
    Kao, Wen-Chung
    ENGINEERING LETTERS, 2024, 32 (05) : 981 - 994
  • [44] Conformance test development with the Java']Java modeling language
    Sondergaard, Hans
    Korsholm, Stephan E.
    Ravn, Anders P.
    CONCURRENCY AND COMPUTATION-PRACTICE & EXPERIENCE, 2017, 29 (22):
  • [45] How can I test Java']Java classes?
    Rangaraajan, K
    DR DOBBS JOURNAL, 1999, 24 (07): : 107 - 110
  • [46] String Test Data Generation for Java']Java Programs
    Wang, Miaomiao
    Cui, Baoquan
    Yan, Jiwei
    Yan, Jun
    Zhang, Jian
    2022 IEEE 33RD INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING (ISSRE 2022), 2022, : 251 - 262
  • [47] JFORTES: Java']Java FORmal unit TESt generation
    Bentes, Larissa
    Rocha, Herbert
    Valentin, Eduardo
    Barreto, Raimundo
    2016 VI BRAZILIAN SYMPOSIUM ON COMPUTING SYSTEMS ENGINEERING (SBESC 2016), 2016, : 16 - 23
  • [48] An integration test coverage metric for Java']Java programs
    Mukherjee, Debashis
    Mall, Rajib
    INTERNATIONAL JOURNAL OF SYSTEM ASSURANCE ENGINEERING AND MANAGEMENT, 2019, 10 (04) : 576 - 601
  • [49] A Test Taxonomy Applied to the Mechanics of Java']Java Refactorings
    Counsell, Steve
    Swift, Stephen
    Hierons, Rob A.
    ADVANCES IN COMPUTER AND INFORMATIOM SCIENCES AND ENGINEERING, 2008, : 497 - 502
  • [50] How Java']Java Programmers Test Exceptional Behavior
    Marcilio, Diego
    Furia, Carlo A.
    2021 IEEE/ACM 18TH INTERNATIONAL CONFERENCE ON MINING SOFTWARE REPOSITORIES (MSR 2021), 2021, : 207 - 218