Learning to predict test effectiveness

08/20/2022
by   Morteza Zakeri Nasrabadi, et al.
0

The high cost of the test can be dramatically reduced, provided that the coverability as an inherent feature of the code under test is predictable. This article offers a machine learning model to predict the extent to which the test could cover a class in terms of a new metric called Coverageability. The prediction model consists of an ensemble of four regression models. The learning samples consist of feature vectors, where features are source code metrics computed for a class. The samples are labeled by the Coverageability values computed for their corresponding classes. We offer a mathematical model to evaluate test effectiveness in terms of size and coverage of the test suite generated automatically for each class. We extend the size of the feature space by introducing a new approach to defining sub-metrics in terms of existing source code metrics. Using feature importance analysis on the learned prediction models, we sort source code metrics in the order of their impact on the test effectiveness. As a result of which, we found the class strict cyclomatic complexity as the most influential source code metric. Our experiments with the prediction models on a large corpus of Java projects containing about 23,000 classes demonstrate the Mean Absolute Error (MAE) of 0.032, Mean Squared Error (MSE) of 0.004, and an R2-score of 0.855. Compared with the state-of-the-art coverage prediction models, our models improve MAE, MSE, and an R2-score by 5.78

READ FULL TEXT

page 13

page 14

research
08/20/2022

An ensemble meta-estimator to predict source code testability

Unlike most other software quality attributes, testability cannot be eva...
research
01/19/2023

Source Code Metrics for Software Defects Prediction

In current research, there are contrasting results about the applicabili...
research
10/29/2021

DeepDoseNet: A Deep Learning model for 3D Dose Prediction in Radiation Therapy

The DeepDoseNet 3D dose prediction model based on ResNet and Dilated Den...
research
05/26/2019

Improving Change Prediction Models with Code Smell-Related Information

Code smells represent sub-optimal implementation choices applied by deve...
research
09/16/2021

A Machine Learning Framework for Automatic Prediction of Human Semen Motility

In this paper, human semen samples from the visem dataset collected by t...
research
05/26/2021

The Impact of Dormant Defects on Defect Prediction: a Study of 19 Apache Projects

Defect prediction models can be beneficial to prioritize testing, analys...
research
05/31/2022

Using Source Code Metrics for Predicting Metamorphic Relations at Method Level

Metamorphic testing (TM) examines the relations between inputs and outpu...

Please sign up or login with your details

Forgot password? Click here to reset