Enhancing software quality through comparative analysis of machine learning techniques for test case prioritization using object-oriented metrics - Kumari, M. K. M. N.; Wasalthilaka, W. V. S. K. (National Engineering Research & Development Center of Sri Lanka, 2025)
Software quality plays an important role in software engineering. Quality software depends heavily on software testing. Regression testing is essential to this process and ensures that recent changes do not affect existing features. However, regression testing is often time-consuming and resource-intensive. Test Case Prioritization (TCP) techniques can be used to optimize the regression testing process. This research focuses on leveraging machine learning techniques to improve TCP using object-oriented metrics like Coupling Between Objects (CBO), Weighted Methods per Class (WMC), Depth of Inheritance Tree (DIT), Number of Children (NOC), Response for a Class (RFC), Lack of Cohesion of Methods (LCOM), fanin, and fan-out. The dataset is divided into 70% of training and 30% of testing sets by using data preprocessing and feature selection methods. Then the trained models were evaluated using performance metrics such as accuracy, precision, recall, and f1-score. Different machine learning algorithms such as Decision Tree, Random Forest, Neural Networks, K-Nearest Neighbor (KNN), and Logistic Regression were compared using object-oriented metrics to identify the best approach. Among these algorithms, the decision tree algorithm outperformed other algorithms. Because of its ability to handle complex decision boundaries with minimal overfitting and achieved 71% accuracy. Finally developed the TCP framework using the Decision Tree algorithm. This framework automatically prioritizes test cases by code metric values to optimize testing efforts, detecting critical defects early while saving time and resources. This result highlighted their potential for greatly improving regression testing efficiency and software quality.
Keywords: Machine Learning; Object-Oriented Metrics; Software Quality; Test Case Prioritization