Causes and Effects of Fitness Landscapes in Unit Test Generation

被引:13
作者
Albunian, Nasser [1 ]
Fraser, Gordon [2 ]
Sudholt, Dirk [1 ]
机构
[1] Univ Sheffield, Dept Comp Sci, Sheffield, S Yorkshire, England
[2] Univ Passau, Chair Software Engn 2, Passau, Germany
来源
GECCO'20: PROCEEDINGS OF THE 2020 GENETIC AND EVOLUTIONARY COMPUTATION CONFERENCE | 2020年
关键词
Fitness landscape analysis; Search-Based Test Generation; Empirical Software Engineering; Genetic Algorithm; NEUTRALITY;
D O I
10.1145/3377930.3390194
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Search-based unit test generation applies evolutionary search to maximize code coverage. Although the performance of this approach is often good, sometimes it is not, and how the fitness landscape affects this performance is poorly understood. This paper presents a thorough analysis of 331 Java classes by (i) characterizing their fitness landscape using six established fitness landscape measures, (ii) analyzing the impact of these fitness landscape measures on the search, and (iii) investigating the underlying properties of the source code influencing these measures. Our results reveal that classical indicators for rugged fitness landscapes suggest well searchable problems in the case of unit test generation, but the fitness landscape for most problem instances is dominated by detrimental plateaus. A closer look at the underlying source code suggests that these plateaus are frequently caused by code in private methods, methods throwing exceptions, and boolean flags. This suggests that inter-procedural distance metrics and testability transformations could improve search-based test generation.
引用
收藏
页码:1204 / 1212
页数:9
相关论文
共 32 条
[1]   Analysing the fitness landscape of search-based software testing problems [J].
Aleti, Aldeida ;
Moser, I. ;
Grunske, Lars .
AUTOMATED SOFTWARE ENGINEERING, 2017, 24 (03) :603-621
[2]  
[Anonymous], 2010, ISSTA 10
[3]   It really does matter how you normalize the branch distance in search-based software testing [J].
Arcuri, Andrea .
SOFTWARE TESTING VERIFICATION & RELIABILITY, 2013, 23 (02) :119-147
[4]  
Arcuri A, 2011, LECT NOTES COMPUT SC, V6956, P33, DOI 10.1007/978-3-642-23716-4_6
[5]  
Barnett L, 1998, FROM ANIM ANIMAT, P18
[6]   An empirical evaluation of evolutionary algorithms for unit test suite generation [J].
Campos, Jose ;
Ge, Yan ;
Albunian, Nasser ;
Fraser, Gordon ;
Eler, Marcelo ;
Arcuri, Andrea .
INFORMATION AND SOFTWARE TECHNOLOGY, 2018, 104 :207-235
[7]   A Large-Scale Evaluation of Automated Unit Test Generation Using EvoSuite [J].
Fraser, Gordon ;
Arcuri, Andrea .
ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2014, 24 (02)
[8]   Whole Test Suite Generation [J].
Fraser, Gordon ;
Arcuri, Andrea .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2013, 39 (02) :276-291
[9]  
Fraser Gordon, 2011, 19 ACM SIGSOFT S FDN, P416, DOI [10.1145/2025113.2025179, DOI 10.1145/2025113.2025179]
[10]   Challenges in Using Search-Based Test Generation to Identify Real Faults in Mockito [J].
Gay, Gregory .
SEARCH BASED SOFTWARE ENGINEERING, SSBSE 2016, 2016, 9962 :231-237