4.7 Article

An ensemble meta-estimator to predict source code testability

期刊

APPLIED SOFT COMPUTING
卷 129, 期 -, 页码 -

出版社

ELSEVIER
DOI: 10.1016/j.asoc.2022.109562

关键词

Software testability; Software metrics; Automated refactoring; Static and dynamic analysis; Machine learning

向作者/读者索取更多资源

Unlike most other software quality attributes, testability cannot be evaluated solely based on the characteristics of the source code. This paper offers a new equation to estimate testability regarding the size and coverage of a given test suite, and regression models are used to predict testability based on source code metrics.
Unlike most other software quality attributes, testability cannot be evaluated solely based on the characteristics of the source code. The effectiveness of the test suite and the budget assigned to the test highly impact the testability of the code under test. The size of a test suite determines the test effort and cost, while the coverage measure indicates the test effectiveness. Therefore, testability can be measured based on the coverage and number of test cases provided by a test suite, considering the test budget. This paper offers a new equation to estimate testability regarding the size and coverage of a given test suite. The equation has been used to label 23,000 classes belonging to 110 Java projects with their testability measure. The labeled classes were vectorized using 262 metrics. The labeled vectors were fed into a family of supervised machine learning algorithms, regression, to predict testability in terms of the source code metrics. Regression models predicted testability with an R2 of 0.68 and a mean squared error of 0.03, suitable in practice. Fifteen software metrics highly affecting testability prediction were identified using a feature importance analysis technique on the learned model. The proposed models have improved mean absolute error by 38% due to utilizing new criteria, metrics, and data compared with the relevant study on predicting branch coverage as a test criterion. As an application of testability prediction, it is demonstrated that automated refactoring of 42 smelly Java classes targeted at improving the 15 influential software metrics could elevate their testability by an average of 86.87%. (c) 2022 Elsevier B.V. All reserved.

作者

我是这篇论文的作者
点击您的名字以认领此论文并将其添加到您的个人资料中。

评论

主要评分

4.7
评分不足

次要评分

新颖性
-
重要性
-
科学严谨性
-
评价这篇论文

推荐

暂无数据
暂无数据