Measuring and improving software testability at the design level

被引:0
|
作者
Zakeri-Nasrabadi, Morteza [1 ]
Parsa, Saeed [2 ]
Jafari, Sadegh [2 ]
机构
[1] Inst Res Fundamental Sci IPM, Sch Comp Sci, POB 19395-5746, Tehran, Iran
[2] Iran Univ Sci & Technol, Sch Comp Engn, Hengam St,Resalat Sq, Tehran 1684613114, Iran
关键词
Software testability; Design for testability; Object-oriented design; Class diagram; Automated refactoring; Design patterns; SOURCE CODE METRICS;
D O I
10.1016/j.infsof.2024.107511
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Context: The quality of software systems is significantly influenced by design testability, an aspect often overlooked during the initial phases of software development. The implementation may deviate from its design, resulting in decreased testability at the integration and unit levels. Objective: The objective of this study is to automatically identify low-testable parts in object-orientated design and enhance them by refactoring to design patterns. The impact of various design metrics mainly coupling (e.g., fan-in and fan-out) and inheritance (e.g., depth of inheritance tree and number of subclasses) metrics on design testability is measured to select the most appropriate refactoring candidates. Method: The methodology involves creating a machine learning model for design testability prediction using a large dataset of Java classes, followed by developing an automated refactoring tool. The design classes are vectorized by ten design metrics and labeled with testability scores calculated from a mathematical model. The model computes testability based on code coverage and test suite size of classes that have already been tested via automatic tools. A voting regressor model is trained to predict the design testability of any class diagram based on these design metrics. The proposed refactoring tool for dependency injection and factory method is applied to various open-source Java projects, and its impact on design testability is assessed. Results: The proposed design testability model demonstrates its effectiveness by satisfactorily predicting design testability, as indicated by a mean squared error of 0.04 and an R2 score of 0.53. The automated refactoring tool has been successfully evaluated on six open-source Java projects, revealing an enhancement in design testability by up to 19.11 %. Conclusion: The proposed automated approach offers software developers the means to continuously evaluate and enhance design testability throughout the entire software development life cycle, mitigating the risk of testability issues stemming from design-to-implementation discrepancies.
引用
收藏
页数:21
相关论文
共 50 条
  • [1] Measuring and improving design patterns testability
    Baudry, B
    Le Traon, Y
    Sunyé, G
    Jézéquel, JM
    NINTH INTERNATIONAL SOFTWARE METRICS SYMPOSIUM, PROCEEDINGS, 2003, : 50 - 59
  • [2] On an Embedded Software Design Architecture for Improving the Testability of In-Vehicle Multimedia Software
    Obele, Brownson Obaridoa
    Kim, DongYul
    2014 SEVENTH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE TESTING, VERIFICATION AND VALIDATION WORKSHOPS (ICSTW 2014), 2014, : 349 - 352
  • [3] A process for improving software testability
    Lamoreaux, T
    Ofori-Kyei, M
    Pinone, M
    20TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE, PROCEEDINGS, 2004, : 502 - 502
  • [4] Measuring Software Testability Modulo Test Quality
    Terragni, Valerio
    Salza, Pasquale
    Pezze, Mauro
    2020 IEEE/ACM 28TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION, ICPC, 2020, : 241 - 251
  • [5] IMPROVING SOFTWARE TESTABILITY BY OBSERVABILITY AND CONTROLLABILITY MEASURES
    GUPTA, SC
    SINHA, MK
    INFORMATION PROCESSING '94, VOL I: TECHNOLOGY AND FOUNDATIONS, 1994, 51 : 147 - 154
  • [6] Improving the Testing and Testability of Software Product Lines
    Cabral, Isis
    Cohen, Myra B.
    Rothermel, Gregg
    SOFTWARE PRODUCT LINES: GOING BEYOND, 2010, 6287 : 241 - 255
  • [7] Communications software design for testability: specification transformations and testability measures
    Dssouli, R
    Karoui, K
    Saleh, K
    Cherkaoui, O
    INFORMATION AND SOFTWARE TECHNOLOGY, 1999, 41 (11-12) : 729 - 743
  • [8] Communications software design for testability: specification transformations and testability measures
    Dssouli, R.
    Karoui, K.
    Saleh, K.
    Cherkaoui, O.
    Information and Software Technology, 1999, 41 (11): : 729 - 743
  • [9] DESIGN FOR TESTABILITY IN EMBEDDED SOFTWARE PROJECTS
    Sahay, Gaurav
    2011 IEEE/AIAA 30TH DIGITAL AVIONICS SYSTEMS CONFERENCE (DASC), 2011,
  • [10] ADDRESSING DESIGN FOR TESTABILITY AT THE ARCHITECTURAL LEVEL
    CHICKERMANE, V
    LEE, J
    PATEL, JH
    IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS, 1994, 13 (07) : 920 - 934