An ensemble meta-estimator to predict source code testability

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

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 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

READ FULL TEXT

page 28

page 32

page 36

research
08/20/2022

Learning to predict test effectiveness

The high cost of the test can be dramatically reduced, provided that the...
research
09/26/2021

Defect Prediction Guided Search-Based Software Testing

Today, most automated test generators, such as search-based software tes...
research
01/25/2022

Investigating Software Testability and Test cases Effectiveness

Software measurement is an essential management tool to develop robust a...
research
10/28/2022

ATM: Black-box Test Case Minimization based on Test Code Similarity and Evolutionary Search

Executing large test suites is time and resource consuming, sometimes im...
research
08/18/2021

Restats: A Test Coverage Tool for RESTful APIs

Test coverage is a standard measure used to evaluate the completeness of...
research
01/28/2020

A Study of Pyramid Structure for Code Correction

We demonstrate the implementations of pyramid encoders in both multi-lay...
research
08/20/2018

Leveraging Historical Associations between Requirements and Source Code to Identify Impacted Classes

As new requirements are introduced and implemented in a software system,...

Please sign up or login with your details

Forgot password? Click here to reset