Predictive Mutation Analysis via Natural Language Channel in Source Code

04/22/2021
by   Jinhan Kim, et al.
0

Mutation analysis can provide valuable insights into both System Under Test (SUT) and its test suite. However, it is not scalable due to the cost of building and testing a large number of mutants. Predictive Mutation Testing (PMT) has been proposed to reduce the cost of mutation testing, but it can only provide statistical inference about whether a mutant will be killed or not by the entire test suite. We propose Seshat, a Predictive Mutation Analysis (PMA) technique that can accurately predict the entire kill matrix, not just the mutation score of the given test suite. Seshat exploits the natural language channel in code, and learns the relationship between the syntactic and semantic concepts of each test case and the mutants it can kill, from a given kill matrix. The learnt model can later be used to predict the kill matrices for subsequent versions of the program, even after both the source and test code have changed significantly. Empirical evaluation using the programs in the Defects4J shows that Seshat can predict kill matrices with the average F-score of 0.83 for versions that are up to years apart. This is an improvement of F-score by 0.14 and 0.45 point over the state-of-the-art predictive mutation testing technique, and a simple coverage based heuristic, respectively. Seshat also performs as well as PMT for the prediction of mutation scores only. Once Seshat trains its model using a concrete mutation analysis, the subsequent predictions made by Seshat are on average 39 times faster than actual test-based analysis.

READ FULL TEXT

page 1

page 2

page 3

page 4

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
09/05/2023

Contextual Predictive Mutation Testing

Mutation testing is a powerful technique for assessing and improving tes...
research
12/28/2021

Cerebro: Static Subsuming Mutant Selection

Mutation testing research has indicated that a major part of its applica...
research
12/29/2021

Mutation Testing in Evolving Systems: Studying the relevance of mutants to code evolution

When software evolves, opportunities for introducing faults appear. Ther...
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
03/13/2019

Is the Stack Distance Between Test Case and Method Correlated With Test Effectiveness?

Mutation testing is a means to assess the effectiveness of a test suite ...
research
09/05/2023

Mind the Gap: The Difference Between Coverage and Mutation Score Can Guide Testing Efforts

An "adequate" test suite should effectively find all inconsistencies bet...

Please sign up or login with your details

Forgot password? Click here to reset