Comparison of Unit-Level Automated Test Generation Tools

Comparison of Unit-Level Automated Test Generation Tools
复制标题

DOI:
10.1109/icstw.2009.36
复制
发表时间:
2009-04
期刊:
2009 International Conference on Software Testing, Verification, and Validation Workshops
影响因子:
--
通讯作者:
Shuang Wang;A. Offutt
Shuang Wang;A. Offutt
中科院分区:
其他
文献类型:
--
作者:
Shuang Wang;A. Offutt

文献摘要

被引文献

相似文献

来自全球项目的数据显示,许多软件项目都失败了,而且大多数都延迟完成或超出预算。单元测试是一种简单但有效的技术,可以在质量、灵活性和上市时间方面改进软件。单元测试的一个关键思想是,每段代码都需要自己的测试,而设计这些测试的最佳人选是编写软件的开发人员。然而,手动为每个单元生成测试非常昂贵,甚至可能令人望而却步。自动测试数据生成对于支持单元测试至关重要,随着单元测试越来越受到关注,开发人员对自动化单元测试数据生成工具的需求越来越大。然而,开发人员对哪些工具有效的信息知之甚少。本实验比较了三种著名的公共可访问单元测试数据生成工具 JCrasher、TestGen4j 和 JUB。我们将它们应用到 Java 类中,并根据它们的突变分数对其进行评估。作为比较,我们为每个班级创建了两组额外的测试。一个测试集包含随机值,另一个测试集包含满足边缘覆盖的值。结果表明,自动测试数据生成工具生成的测试与随机测试具有几乎相同的突变分数。
Data from projects worldwide show that many software projects fail and most are completed late or over budget. Unit testing is a simple but effective technique to improve software in terms of quality, flexibility, and time-to-market. A key idea of unit testing is that each piece of code needs its own tests and the best person to design those tests is the developer who wrote the software. However, generating tests for each unit by hand is very expensive, possibly prohibitively so. Automatic test data generation is essential to support unit testing and as unit testing is achieving more attention, developers have a greater need for automated unit test data generation tools. However, developers have very little information about which tools are effective. This experiment compared three well-known public-accessible unit test data generation tools, JCrasher, TestGen4j, and JUB. We applied them to Java classes and evaluated them based on their mutation scores. As a comparison, we created two additional sets of tests for each class. One test set contained random values and the other contained values to satisfy edge coverage. Results showed that the automatic test data generation tools generated tests with almost the same mutation scores as the random tests.