How to kill them all: an exploratory study on the impact of code observability on mutation testing
- Published
- Accepted
- Subject Areas
- Software Engineering
- Keywords
- mutation testing, code quality, mutant observability
- Copyright
- © 2019 Zhu et al.
- Licence
- This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, reproduction and adaptation in any medium and for any purpose provided that it is properly attributed. For attribution, the original author(s), title, publication source (PeerJ Preprints) and either DOI or URL of the article must be cited.
- Cite this article
- 2019. How to kill them all: an exploratory study on the impact of code observability on mutation testing. PeerJ Preprints 7:e27794v1 https://doi.org/10.7287/peerj.preprints.27794v1
Abstract
Mutation testing has been well-known for its efficacy to assess test quality, and recently it has started to be applied in the industry as well. However, what should a developer do when confronted with a low mutation score? Should the test suite be reinforced to increase the mutation score, or should the production code be improved as well, to make the creation of better tests possible? In this paper, we investigate whether testability and observability metrics are correlated with the mutation score on six open source Java projects. We observe a correlation between observability metrics and the mutation score, e.g., test directness seems to be an essential factor. Based on our insights from the correlation study, we propose a number of "mutation score anti-patterns", which enable software engineers to refactor their existing code to be able to improve the mutation score. In doing so, we observe that relatively simple refactoring operations enable an improvement in the mutation score.
Author Comment
This is a preprint of our research work on the impact of code observability on mutation testing