1600 faults in 100 projects: automatically finding faults while achieving high coverage with EvoSuite

被引:69
作者
Fraser, Gordon [1 ]
Arcuri, Andrea [2 ]
机构
[1] Univ Sheffield, Dept Comp Sci, Sheffield S1 4DP, S Yorkshire, England
[2] Simula Res Lab, Certus Software V&V Ctr, Lysaker, Norway
关键词
Search-based testing; Automated test generation; Test oracles; TEST-DATA GENERATION;
D O I
10.1007/s10664-013-9288-2
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Automated unit test generation techniques traditionally follow one of two goals: Either they try to find violations of automated oracles (e.g., assertions, contracts, undeclared exceptions), or they aim to produce representative test suites (e.g., satisfying branch coverage) such that a developer can manually add test oracles. Search-based testing (SBST) has delivered promising results when it comes to achieving coverage, yet the use in conjunction with automated oracles has hardly been explored, and is generally hampered as SBST does not scale well when there are too many testing targets. In this paper we present a search-based approach to handle both objectives at the same time, implemented in the EvoSuite tool. An empirical study applying EvoSuite on 100 randomly selected open source software projects (the SF100 corpus) reveals that SBST has the unique advantage of being well suited to perform both traditional goals at the same time-efficiently triggering faults, while producing representative test sets for any chosen coverage criterion. In our study, EvoSuite detected twice as many failures in terms of undeclared exceptions as a traditional random testing approach, witnessing thousands of real faults in the 100 open source projects. Two out of every five classes with undeclared exceptions have actual faults, but these are buried within many failures that are caused by implicit preconditions. This "noise" can be interpreted as either a call for further research in improving automated oracles-or to make tools like EvoSuite an integral part of software development to enforce clean program interfaces.
引用
收藏
页码:611 / 639
页数:29
相关论文
共 46 条
[1]  
[Anonymous], INTRO PROBABILITY TH
[2]   A Hitchhiker's guide to statistical tests for assessing randomized algorithms in software engineering [J].
Arcuri, Andrea ;
Briand, Lionel .
SOFTWARE TESTING VERIFICATION & RELIABILITY, 2014, 24 (03) :219-250
[3]   Parameter tuning or default values? An empirical investigation in search-based software engineering [J].
Arcuri, Andrea ;
Fraser, Gordon .
EMPIRICAL SOFTWARE ENGINEERING, 2013, 18 (03) :594-623
[4]   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
[5]   Random Testing: Theoretical Results and Practical Implications [J].
Arcuri, Andrea ;
Iqbal, Muhammad Zohaib ;
Briand, Lionel .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2012, 38 (02) :258-277
[6]  
BARESI L, 2001, CISTR0102 U OR
[7]  
Barr E, 2013, P INT C PRINC PROGR
[8]  
Bauersfeld S, 2013, INT WORKSH SEARCH BA
[9]  
Bhattacharya N, 2011, LECT NOTES COMPUT SC, V6956, P204, DOI 10.1007/978-3-642-23716-4_19
[10]  
Clarke L. A., 1976, IEEE Transactions on Software Engineering, VSE-2, P215, DOI 10.1109/TSE.1976.233817