当前位置: X-MOL 学术Software Qual. J. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Test-driven development with mutation testing – an experimental study
Software Quality Journal ( IF 1.7 ) Pub Date : 2020-11-18 , DOI: 10.1007/s11219-020-09534-x
Adam Roman , Michal Mnich

Test-driven development (TDD) is a popular design approach used by the developers with testing being the important software development driving factor. On the other hand, mutation testing is considered one of the most effective testing techniques. However, there is not so much research on combining these two techniques together. In this paper, we propose a novel, hybrid approach called TDD+M which combines test-driven development process together with the mutation approach. The aim was to check whether this modified approach allows the developers to write a better quality code. We verify our approach by conducting a controlled experiment and we show that it achieves better results than the sole TDD technique. The experiment involved 22 computer science students split into eight groups. Four groups (TDD+M) were using our approach, the other four (TDD) – a normal TDD process. We performed a cross-experiment by measuring the code coverage and mutation coverage for each combination (code of group X, tests from group Y). The TDD+M tests achieved better coverage on the code from TDD groups than the TDD tests on their own code (53.3% vs. 33.5% statement coverage and 64.9% vs. 37.5% mutation coverage). The TDD+M tests also found more post-release defects in the TDD code than TDD tests in the TDD+M code. The experiment showed that adding mutation into the TDD process allows the developers to provide better, stronger tests and to write a better quality code.

中文翻译:

带有突变测试的测试驱动开发——一项实验研究

测试驱动开发 (TDD) 是开发人员使用的一种流行的设计方法,测试是重要的软件开发驱动因素。另一方面,突变测试被认为是最有效的测试技术之一。然而,将这两种技术结合在一起的研究并不多。在本文中,我们提出了一种称为 TDD+M 的新型混合方法,它将测试驱动开发过程与变异方法结合在一起。目的是检查这种修改后的方法是否允许开发人员编写质量更好的代码。我们通过进行受控实验来验证我们的方法,并且我们表明它比唯一的 TDD 技术取得了更好的结果。该实验涉及 22 名计算机科学专业的学生,​​他们分成八组。四组 (TDD+M) 正在使用我们的方法,其他四个 (TDD) – 一个正常的 TDD 过程。我们通过测量每个组合(X 组的代码,Y 组的测试)的代码覆盖率和变异覆盖率来进行交叉实验。TDD+M 测试对来自 TDD 组的代码的覆盖率高于对他们自己代码的 TDD 测试(53.3% 对 33.5% 的语句覆盖率和 64.9% 对 37.5% 的突变覆盖率)。TDD+M 测试还发现 TDD 代码中的发布后缺陷多于 TDD+M 代码中的 TDD 测试。实验表明,在 TDD 过程中添加突变可以让开发人员提供更好、更强大的测试并编写质量更好的代码。TDD+M 测试对来自 TDD 组的代码的覆盖率高于对他们自己代码的 TDD 测试(53.3% 对 33.5% 的语句覆盖率和 64.9% 对 37.5% 的突变覆盖率)。TDD+M 测试还发现 TDD 代码中的发布后缺陷多于 TDD+M 代码中的 TDD 测试。实验表明,在 TDD 过程中添加突变可以让开发人员提供更好、更强大的测试并编写质量更好的代码。TDD+M 测试对来自 TDD 组的代码的覆盖率高于对他们自己代码的 TDD 测试(53.3% 对 33.5% 的语句覆盖率和 64.9% 对 37.5% 的突变覆盖率)。TDD+M 测试还发现 TDD 代码中的发布后缺陷多于 TDD+M 代码中的 TDD 测试。实验表明,在 TDD 过程中添加突变可以让开发人员提供更好、更强大的测试并编写质量更好的代码。
更新日期:2020-11-18
down
wechat
bug