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

03/13/2019
by   Rainer Niedermayr, et al.
0

Mutation testing is a means to assess the effectiveness of a test suite and its outcome is considered more meaningful than code coverage metrics. However, despite several optimizations, mutation testing requires a significant computational effort and has not been widely adopted in industry. Therefore, we study in this paper whether test effectiveness can be approximated using a more light-weight approach. We hypothesize that a test case is more likely to detect faults in methods that are close to the test case on the call stack than in methods that the test case accesses indirectly through many other methods. Based on this hypothesis, we propose the minimal stack distance between test case and method as a new test measure, which expresses how close any test case comes to a given method, and study its correlation with test effectiveness. We conducted an empirical study with 21 open-source projects, which comprise in total 1.8 million LOC, and show that a correlation exists between stack distance and test effectiveness. The correlation reaches a strength up to 0.58. We further show that a classifier using the minimal stack distance along with additional easily computable measures can predict the mutation testing result of a method with 92.9 be taken into consideration as a light-weight alternative to mutation testing or as a preceding, less costly step to that.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/22/2022

Characterizing High-Quality Test Methods: A First Empirical Study

To assess the quality of a test suite, one can rely on mutation testing,...
research
02/22/2021

Practical Mutation Testing at Scale

Mutation analysis assesses a test suite's adequacy by measuring its abil...
research
02/13/2018

MDroid+: A Mutation Testing Framework for Android

Mutation testing has shown great promise in assessing the effectiveness ...
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
04/19/2022

Test suite effectiveness metric evaluation: what do we know and what should we do?

Comparing test suite effectiveness metrics has always been a research ho...
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/26/2020

What It Would Take to Use Mutation Testing in Industry–A Study at Facebook

Traditionally, mutation testing generates an abundance of small deviatio...

Please sign up or login with your details

Forgot password? Click here to reset