[Paper Review] Investigating Software Testability and Test cases Effectiveness
This study investigates the relationship between static code metrics and test metrics to predict software testability and test case effectiveness in object-oriented systems. Using mutation analysis and multiple feature selection algorithms on 1,186 Java open-source projects, the research identifies size and complexity metrics—particularly NBI, RFC, LOC, LOCCOM, WMC, and NMC—as key predictors of testability and test effectiveness, with NBI and RFC emerging as the most influential across all evaluation methods.
Software measurement is an essential management tool to develop robust and maintainable software systems. Software metrics can be used to control the inherent complexities in software design. To guarantee that the components of the software are inevitably testable, the testability attribute is used, which is a sub-characteristics of the software's maintabilility as well as quality assurance. This study investigates the relationship between static code and test metrics and testability and test cases effectiveness. The study answers three formulated research questions. The results of the analysis showed that size and complexity metrics are suitable for predicting the testability of object-oriented classes.
Motivation & Objective
- To investigate how static code and test metrics influence software testability and test case effectiveness.
- To identify the most relevant code and test metrics for predicting testability and test effectiveness in object-oriented systems.
- To develop a predictive model that distinguishes non-effective from effective test cases using software metrics.
- To support practitioners in improving test design and software quality by highlighting metrics that correlate with test effectiveness.
Proposed method
- Collected data from 1,186 open-source Java projects using static code and test metrics.
- Calculated test case effectiveness using mutation scores as a proxy for test quality.
- Applied multiple feature selection algorithms—Gain Ratio, Information Gain, Symmetrical Uncertainty, OneR—to rank metric importance.
- Used 10-fold cross-validation with multiple classifiers to evaluate model performance and ensure robustness.
- Excluded test cases with average effectiveness (discretization noise) to improve classification accuracy.
- Evaluated the predictive power of 28 metrics across two categories: code size and complexity.
Experimental results
Research questions
- RQ1Which static code and test metrics best predict software testability in object-oriented classes?
- RQ2How do different feature selection algorithms rank the importance of code and test metrics in predicting test effectiveness?
- RQ3Can a predictive model effectively distinguish between non-effective and effective test cases using code and test metrics?
Key findings
- Size and complexity metrics—especially NBI, RFC, LOC, LOCCOM, WMC, and NMC—are strong predictors of testability and test case effectiveness.
- NBI (Number of Bytecode Instructions) and RFC (Response for a Class) consistently ranked as the top two most important metrics across all feature selection algorithms.
- LOC (Lines of Code) and LOCCOM (Lines of Comment) were ranked in the top four across all methods, indicating their relevance in testability prediction.
- WMC (Weighted Methods per Class) and NMC (Number of Method Calls) were consistently ranked in the top five, highlighting their role in complexity-based testability assessment.
- The use of mutation score as a proxy for test effectiveness was validated through cross-validation and multiple evaluation metrics, ensuring model reliability.
- The study confirms that code quality metrics significantly influence test effectiveness, offering actionable insights for developers to improve test design and maintainability.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.