当前位置: X-MOL 学术J. Syst. Softw. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
How to kill them all: An exploratory study on the impact of code observability on mutation testing
Journal of Systems and Software ( IF 3.7 ) Pub Date : 2021-03-01 , DOI: 10.1016/j.jss.2020.110864
Qianqian Zhu , Andy Zaidman , Annibale Panichella

Abstract Mutation testing is well-known for its efficacy in assessing test quality, and starting to be applied in the industry. However, what should a developer do when confronted with a low mutation score? Should the test suite be plainly 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 aim to provide a new perspective to developers that enables them to understand and reason about the mutation score in the light of testability and observability. First, 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, which measures the extent to which the production code is tested directly, seems to be an essential factor. Based on our insights from the correlation study, we propose a number of ”mutation score anti-patterns”, enabling software engineers to refactor their existing code or add tests to improve the mutation score. In doing so, we observe that relatively simple refactoring operations enable an improvement or increase in the mutation score.

中文翻译:

如何杀死他们:关于代码可观察性对变异测试影响的探索性研究

摘要 突变测试以其在评估测试质量方面的有效性而著称,并开始在行业中应用。但是,当遇到低变异分数时,开发人员应该怎么做?是否应该明确地加强测试套件以增加变异分数,还是应该改进生产代码,以使创建更好的测试成为可能?在本文中,我们旨在为开发人员提供一个新的视角,使他们能够根据可测试性和可观察性来理解和推理变异分数。首先,我们调查了可测试性和可观察性指标是否与六个开源 Java 项目的变异分数相关。我们观察了可观察性指标和变异分数之间的相关性,例如,测试直接性,它衡量直接测试生产代码的程度,似乎是一个重要因素。基于我们从相关性研究中获得的见解,我们提出了许多“变异评分反模式”,使软件工程师能够重构其现有代码或添加测试以提高变异评分。在这样做时,我们观察到相对简单的重构操作可以改进或增加变异分数。
更新日期:2021-03-01
down
wechat
bug