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 条
  • [31] A concurrency test tool for Java']Java monitors
    Long, B
    Hoffman, D
    Strooper, P
    16TH ANNUAL INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE 2001), PROCEEDINGS, 2001, : 421 - 425
  • [32] In vivo test and rollback of Java']Java applications as they are
    Bertolino, Antonia
    De Angelis, Guglielmo
    Miranda, Breno
    Tonella, Paolo
    SOFTWARE TESTING VERIFICATION & RELIABILITY, 2023, 33 (07):
  • [33] JNose: Java']Java Test Smell Detector
    Virginio, Tassio
    Martins, Luana
    Rocha, Larissa
    Santana, Railana
    Cruz, Adriana
    Costa, Heitor
    Machado, Ivan
    34TH BRAZILIAN SYMPOSIUM ON SOFTWARE ENGINEERING, SBES 2020, 2020, : 564 - 569
  • [34] Regression test selection for Java']Java software
    Harrold, MJ
    Jones, JA
    Li, TY
    Liang, DL
    Orso, A
    Pennings, M
    Sinha, S
    Spoon, SA
    Gujarathi, A
    ACM SIGPLAN NOTICES, 2001, 36 (11) : 312 - 326
  • [35] Identification and Refactoring of Exception Handling Code Smells in Java']JavaScript
    Hsieh, Chin-Yun
    Canh Le My
    Kim Thoa Ho
    Cheng, Yu Chin
    JOURNAL OF INTERNET TECHNOLOGY, 2017, 18 (06): : 1461 - 1471
  • [36] On the Use of Smelly Examples to Detect Code Smells in Java']JavaScript
    Shoenberger, Ian
    Mkaouer, Mohamed Wiem
    Kessentini, Marouane
    APPLICATIONS OF EVOLUTIONARY COMPUTATION (EVOAPPLICATIONS 2017), PT II, 2017, 10200 : 20 - 34
  • [37] Mining Test Oracles for Test Inputs Generated from Java']Java Bytecode
    Xu, Weifeng
    Ding, Tao
    Wang, Hanlin
    Xu, Dianxiang
    2013 IEEE 37TH ANNUAL COMPUTER SOFTWARE AND APPLICATIONS CONFERENCE (COMPSAC), 2013, : 27 - 32
  • [38] File Access Extension of Test Code Generation Tool for Java']Java Programming Learning Assistant System
    Funabiki, Nobuo
    Kusaka, Ryota
    Ishihara, Nobuya
    Kao, Wen-Chung
    2017 IEEE 6TH GLOBAL CONFERENCE ON CONSUMER ELECTRONICS (GCCE), 2017,
  • [39] Are unit and integration test definitions still valid for modern Java']Java projects? An empirical study on open-source projects
    Trautsch, Fabian
    Herbold, Steffen
    Grabowski, Jens
    JOURNAL OF SYSTEMS AND SOFTWARE, 2020, 159
  • [40] Code Reuse in Stack Overflow and Popular Open Source Java']Java Projects
    Lotter, Adriaan
    Licorish, Sherlock A.
    Savarimuthu, Bastin Tony Roy
    Meldrum, Sarah
    2018 25TH AUSTRALASIAN SOFTWARE ENGINEERING CONFERENCE (ASWEC), 2018, : 141 - 150