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 条
  • [31] Prediction of testability using the design metrics for object-oriented software
    Singh, Yogesh
    Saha, Anju
    INTERNATIONAL JOURNAL OF COMPUTER APPLICATIONS IN TECHNOLOGY, 2012, 44 (01) : 12 - 22
  • [32] IMPROVING COMMERCIAL SOFTWARE DESIGN
    STEIG, DB
    DATA PROCESSING MAGAZINE, 1971, 13 (09): : 40 - &
  • [33] Towards a 'safe' use of design patterns to improve OO software testability
    Baudry, B
    Sunyé, YLG
    Jézéquel, JM
    12TH INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING, PROCEEDINGS, 2001, : 324 - 329
  • [34] Design for testability of software-based self-test for processors
    Nakazato, Masato
    Ohtake, Satoshi
    Inoue, Michiko
    Fujiwara, Hideo
    PROCEEDINGS OF THE 15TH ASIAN TEST SYMPOSIUM, 2006, : 375 - +
  • [35] Research of design for system-level testability and system partition
    Li, TG
    Huang, KL
    Lian, GY
    Wang, BL
    ICEMI 2005: Conference Proceedings of the Seventh International Conference on Electronic Measurement & Instruments, Vol 1, 2005, : 242 - 245
  • [36] A design and analysis of the missile weapons in the system-level testability
    Huang, KL
    Lian, GY
    Wei, ZL
    ICEMI'2003: PROCEEDINGS OF THE SIXTH INTERNATIONAL CONFERENCE ON ELECTRONIC MEASUREMENT & INSTRUMENTS, VOLS 1-3, 2003, : 259 - 262
  • [37] Formal Value-Range and Variable Testability Techniques for High-Level Design-For-Testability
    Sandhya Seshadri
    Michael S. Hsiao
    Journal of Electronic Testing, 2000, 16 : 131 - 145
  • [38] Formal value-range and variable testability techniques for high-level design-for-testability
    Seshadri, Sandhya
    Hsiao, Michael S.
    Journal of Electronic Testing: Theory and Applications (JETTA), 2000, 16 (1-2): : 131 - 145
  • [39] Testability analysis of reactive software
    Nguyen, TB
    Robach, C
    Delaunay, M
    IWOTA 2004: 1ST INTERNATIONAL WORKSHOP ON TESTABILITY ASSESSMENT, PROCEEDINGS, 2004, : 15 - 25
  • [40] Learning to Predict Software Testability
    Nasrabadi, Morteza Zakeri
    Parsa, Saeed
    2021 26TH INTERNATIONAL COMPUTER CONFERENCE, COMPUTER SOCIETY OF IRAN (CSICC), 2021,