An ensemble meta-estimator to predict source code testability
Morteza Zakeri-Nasrabadi, Saeed Parsa

TL;DR
This paper introduces a machine learning-based approach to predict Java classes' testability using code metrics and test suite characteristics, enabling better testing strategies and automated refactoring.
Contribution
It proposes a new testability equation, labels a large dataset of classes, and develops regression models that outperform previous methods in predicting testability.
Findings
Regression models achieved R2 of 0.68 in testability prediction.
Identified 15 key software metrics influencing testability.
Automated refactoring improved class testability by 86.87% on average.
Abstract
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,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Reliability and Analysis Research · Software System Performance and Reliability
MethodsTest
