MuDelta: Delta-Oriented Mutation Testing at Commit TimeTechnical Track
Fri 28 May 2021 00:25 - 00:45 at Blended Sessions Room 4 - 3.2.4. Mutation Testing: General Issues
In many cases developers would like to test the program changes they introduce. To achieve this, a mutation testing formulation capable of capturing the altered program behaviours that are not adequately tested, is needed. Such a formulation of mutation testing would allow introducing relevant mutants, to the altered program behaviours, thereby allowing developers to focus, at commit time, on testing their changes. We thus introduce MuDelta an approach that identifies commit- relevant mutants; mutants that affect and are affected by the changed program behaviours. Our approach uses machine learning applied on a combined scheme of graph and vector- based representations of static code features. Our results, from 50 commits in 21 Coreutils programs, demonstrate a strong prediction ability of our approach; yielding 0.80 (ROC) and 0.50 (PR-Curve) AUC values with 0.63 and 0.32 precision and recall values. These predictions are significantly higher than random guesses, 0.20 (PR-Curve) AUC, 0.21 and 0.21 precision and recall, and subsequently lead to strong relevant tests that kill 45% more relevant mutants than randomly sampled mutants (either sampled from those residing on the changed component(s) or from the changed lines). Perhaps more importantly, our results show that our approach leads to mutants with 27% higher fault revealing ability in fault introducing commits. Taken together, our results corroborate the conclusion that commit-based mutation testing is suitable and promising for evolving software.