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 条
  • [21] A study on design for testability in component-based embedded software
    Kanstren, Teemu
    SERA 2008: 6TH ACIS INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING RESEARCH, MANAGEMENT AND APPLICATIONS, PROCEEDINGS, 2008, : 31 - 38
  • [22] A Baseline-based BIST Design Model for Software Testability
    Sui, Junhua
    Wang, Jianxin
    Liu, Huina
    Liu, Liquan
    PROCEEDINGS OF THE 2015 INTERNATIONAL CONFERENCE ON INDUSTRIAL TECHNOLOGY AND MANAGEMENT SCIENCE (ITMS 2015), 2015, 34 : 1395 - 1399
  • [23] Promoting the software design for testability towards a partial test oracle
    Lin, JC
    Yeh, PL
    Yang, SC
    EIGHTH IEEE INTERNATIONAL WORKSHOP ON SOFTWARE TECHNOLOGY AND ENGINEERING PRACTICE INCORPORATING COMPUTER AIDED SOFTWARE ENGINEERING, PROCEEDINGS, 1997, : 209 - 214
  • [24] Measuring and improving software process in China
    Wang, Q
    Li, MS
    2005 International Symposium on Empirical Software Engineering (ISESE), Proceedings, 2005, : 177 - 186
  • [25] Considering testability during high-level design
    Dey, Sujit
    Raghunathan, Anand
    Roy, Rabindra K.
    Proceedings of the Asia and South Pacific Design Automation Conference, ASP-DAC, 1998, : 205 - 210
  • [26] SOFTWARE CHECKS TESTABILITY AND GENERATES TESTS OF VLSI DESIGN.
    Kirkland, Tom
    Flores, Victor
    1983, (56):
  • [27] A survey on software testability
    Garousi, Vahid
    Felderer, Michael
    Kilicaslan, Feyza Nur
    INFORMATION AND SOFTWARE TECHNOLOGY, 2019, 108 : 35 - 64
  • [28] TESTABILITY OF SOFTWARE COMPONENTS
    FREEDMAN, RS
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1991, 17 (06) : 553 - 564
  • [29] Considering testability during high-level design
    Dey, S
    Raghunathan, A
    Roy, RK
    PROCEEDINGS OF THE ASP-DAC '98 - ASIA AND SOUTH PACIFIC DESIGN AUTOMATION CONFERENCE 1998 WITH EDA TECHNO FAIR '98, 1998, : 205 - 210
  • [30] Measuring, Assessing and Improving Software Quality based on Object-Oriented Design Principles
    Ploesch, Reinhold
    Braeuer, Johannes
    Koerner, Christian
    Saft, Matthias
    OPEN COMPUTER SCIENCE, 2016, 6 (01): : 187 - 207