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 条
  • [41] SOFTWARE TESTABILITY - THE NEW VERIFICATION
    VOAS, JM
    MILLER, KW
    IEEE SOFTWARE, 1995, 12 (03) : 17 - 28
  • [42] An approach to software testability measurement
    Lin, JC
    Lin, SW
    Huang, L
    ASIA PACIFIC SOFTWARE ENGINEERING CONFERENCE AND INTERNATIONAL COMPUTER SCIENCE CONFERENCE, PROCEEDINGS, 1997, : 515 - 516
  • [43] Formal value-range and variable testability techniques for high-level design-for-testability
    Seshadri, S
    Hsiao, MS
    JOURNAL OF ELECTRONIC TESTING-THEORY AND APPLICATIONS, 2000, 16 (1-2): : 131 - 145
  • [44] DESIGN FOR TESTABILITY
    WRITER, PL
    IEEE TRANSACTIONS ON AEROSPACE AND ELECTRONIC SYSTEMS, 1976, 12 (02) : 304 - 304
  • [45] A New Approach for Software Testability
    du Bousquet, Lydie
    TESTING - PRACTICE AND RESEARCH TECHNIQUES, 2010, 6303 : 207 - 210
  • [46] SEMANTIC METRICS FOR SOFTWARE TESTABILITY
    VOAS, JM
    MILLER, KW
    JOURNAL OF SYSTEMS AND SOFTWARE, 1993, 20 (03) : 207 - 216
  • [47] Improving Security of Logic Encryption in Presence of Design-for-Testability Infrastructure
    Karmakar, Rajit
    Chattopadhyay, Santanu
    Chakraborty, Mrityunjoy
    2019 IEEE INTERNATIONAL SYMPOSIUM ON CIRCUITS AND SYSTEMS (ISCAS), 2019,
  • [48] DESIGN FOR TESTABILITY
    不详
    IEE PROCEEDINGS-A-SCIENCE MEASUREMENT AND TECHNOLOGY, 1985, 132 (04): : 241 - 248
  • [49] An analytic software testability model
    Lin, JC
    Lin, SW
    PROCEEDINGS OF THE 11TH ASIAN TEST SYMPOSIUM (ATS 02), 2002, : 278 - 283
  • [50] Testability analysis for software components
    Nguyen, TB
    Delaunay, M
    Robach, C
    INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE, PROCEEDINGS, 2002, : 422 - 429