Random Test Case Generation and Manual Unit Testing: Substitute or Complement in Retrofitting Tests for Legacy Code?

Random Test Case Generation and Manual Unit Testing: Substitute or Complement in Retrofitting Tests for Legacy Code?
复制标题

随机测试用例生成和手动单元测试:遗留代码改造测试中的替代还是补充?

DOI:
--
复制
发表时间:
2012
期刊:
EUROMICRO Conference on Software Engineering and Advanced Applications
影响因子:
--
通讯作者:
Martina Schmidt
Martina Schmidt
中科院分区:
--
文献类型:
--
作者:
Rudolf Ramler;D. Winkler;Martina Schmidt

文献摘要

被引文献

相似文献

遗留代码的单元测试的特点通常是以最小的努力找到最大数量的缺陷。在有限的时间框架和有限的资源的背景下,用于生成测试用例的方法承诺增加缺陷检测的有效性。本文介绍了一项实证研究的结果调查的有效性(a)手动单元测试进行的48名硕士生在60分钟的时间限制和(B)工具支持的随机测试用例生成与Randoop。这两种方法已被应用于一个Java集合类库包含35个种子缺陷。在时间和资源限制限制手动单元测试性能的特定设置下,我们发现(1)随机测试用例生成检测到的缺陷数量在手动单元测试的范围内,而且(2)随机生成的测试用例检测到的缺陷与手动单元测试不同。因此,随机测试用例生成似乎是对遗留代码的手动单元测试的一个有用的帮助。
Unit testing of legacy code is often characterized by the goal to find a maximum number of defects with minimal effort. In context of restrictive time frames and limited resources, approaches for generating test cases promise increased defect detection effectiveness. This paper presents the results of an empirical study investigating the effectiveness of (a) manual unit testing conducted by 48 master students within a time limit of 60 minutes and (b) tool-supported random test case generation with Randoop. Both approaches have been applied on a Java collection class library containing 35 seeded defects. With the specific settings, where time and resource restrictions limit the performance of manual unit testing, we found that (1) the number of defects detected by random test case generation is in the range of manual unit testing and, furthermore, (2) the randomly generated test cases detect different defects than manual unit testing. Therefore, random test case generation seems a useful aid to jump start manual unit testing of legacy code.