arrow
返回

Toward granular search-based automatic unit test case generation

delete2024-05-17
delete0
delete
OA
AI
F
Fabiano Pecorelli *
G
Giovanni Grano
F
Fabio Palomba
H
Harald C. Gall
A
Andrea De Lucia
DOI:10.1007/s10664-024-10451-xdelete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Unit testing verifies the presence of faults in individual software components. Previous research has been targeting the automatic generation of unit tests through the adoption of random or search-based algorithms. Despite their effectiveness, these approaches aim at creating tests by solely optimizing metrics like code coverage, without ensuring that the resulting tests have granularities that would allow them to verify both the behavior of individual production methods and the interaction between methods of the class under test. To address this limitation, we propose a two-step systematic approach to the generation of unit tests: we first force search-based algorithms to create tests that cover individual methods of the production code, hence implementing the so-called intra-method tests; then, we relax the constraints to enable the creation of intra-class tests that target the interactions among production code methods. The assessment of our approach is conducted through a mixed-method research design that combines statistical analyses with a user study. The key results report that our approach is able to keep the same level of code and mutation coverage while providing test suites that are more structured, more understandable and aligned to the design principles of unit testing.
Keyword:
Search-based Software Testing
Test Code Quality
Automatic Test Case Generation

期刊

Empirical Software Engineering 封面图
Empirical Software Engineering
IF:
3.6
论文数:
2.0K
被引数:
5.3K

机构

U
University of Salerno
学者数:
1.2W
论文数: 1.1W
被引数: 1.2W
U
university of zurich
学者数:
5.1W
论文数: 4.0W
被引数: 65
引用论文

引用论文

Habituation of reinforcer effectiveness
err2014-01-01
err0
errOAAI
errDavid R. Lloyd; Douglas J. Medina; Larry W. Hawk; Whitney D. Fosco; Jerry B. Richards
err分享
err收藏
Developer Testing in the IDE: Patterns, Beliefs, and BehaviorIDE中的开发人员测试: 模式、信念和行为
err2019-03-01
err63
errOAAI
errBeller, Moritz; Gousios, Georgios; Panichella, Annibale; Proksch, Sebastian; Amann, Sven; Zaidman, Andy
err分享
err收藏
Working with unix tools
err2005-07-01
err82
PREAI
errSpinellis, D
err分享
err收藏
Aqueous alteration on asteroids: Linking the mineralogy and spectroscopy of CM and CI chondrites
err2015-01-01
err0
PREAI
errM.M. McAdam; J.M. Sunshine; K.T. Howard; T.M. McCoy
err分享
err收藏
学者 查看更多内容