Contextual Predictive Mutation Testing

09/05/2023
by   Kush Jain, et al.
0

Mutation testing is a powerful technique for assessing and improving test suite quality that artificially introduces bugs and checks whether the test suites catch them. However, it is also computationally expensive and thus does not scale to large systems and projects. One promising recent approach to tackling this scalability problem uses machine learning to predict whether the tests will detect the synthetic bugs, without actually running those tests. However, existing predictive mutation testing approaches still misclassify 33 of detection outcomes on a randomly sampled set of mutant-test suite pairs. We introduce MutationBERT, an approach for predictive mutation testing that simultaneously encodes the source method mutation and test method, capturing key context in the input representation. Thanks to its higher precision, MutationBERT saves 33 checking/verifying live mutants. MutationBERT, also outperforms the state-of-the-art in both same project and cross project settings, with meaningful improvements in precision, recall, and F1 score. We validate our input representation, and aggregation approaches for lifting predictions from the test matrix level to the test suite level, finding similar improvements in performance. MutationBERT not only enhances the state-of-the-art in predictive mutation testing, but also presents practical benefits for real-world applications, both in saving developer time and finding hard to detect mutants.

READ FULL TEXT
research
07/28/2018

Goal-oriented Mutation Testing with Focal Methods

Mutation testing is the state-of-the-art technique for assessing the fau...
research
05/23/2020

The Threat to the Validity of Predictive Mutation Testing: The Impact of Uncovered Mutants

Predictive Mutation Testing (PMT) is a technique to predict whether a mu...
research
02/10/2021

SN4KE: Practical Mutation Testing at Binary Level

Mutation analysis is an effective technique to evaluate a test suite ade...
research
04/22/2021

Predictive Mutation Analysis via Natural Language Channel in Source Code

Mutation analysis can provide valuable insights into both System Under T...
research
10/31/2022

Mutation Testing Optimisations using the Clang Front-end

Mutation testing is the state-of-the-art technique for assessing the fau...
research
12/06/2022

How to Compare Fuzzers

Fuzzing is a key method to discover vulnerabilities in programs. Despite...
research
09/12/2018

Finding Higher Order Mutants Using Variational Execution

Mutation testing is an effective but time consuming method for gauging t...

Please sign up or login with your details

Forgot password? Click here to reset