Skip to main content
Erschienen in: Empirical Software Engineering 3/2015

01.06.2015

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

Erschienen in: Empirical Software Engineering | Ausgabe 3/2015

Einloggen

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

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.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Fußnoten
1
The other participating tools were t2 and DSC, as well as Randoop as a baseline. Tools were evaluated based on achieved code coverage, mutation score and execution time (linearly combined in a single score).
 
2
An alternative would be to resort to data structures that can cope with larger number ranges (e.g., BigDecimal in Java), but this would lead to a significant performance drop.
 
3
Note that we used the 1.01 version of SF100. The original version in (Fraser and Arcuri 2012b) had 8,784 classes, but more classes became available once we fixed some classpath issues (e.g., missing jars) in some of the projects.
 
Literatur
Zurück zum Zitat Arcuri A (2013) It really does matter how you normalize the branch distance in search-based software testing. Softw Test Verif Rel (STVR) 23(2):119–147CrossRef Arcuri A (2013) It really does matter how you normalize the branch distance in search-based software testing. Softw Test Verif Rel (STVR) 23(2):119–147CrossRef
Zurück zum Zitat Arcuri A, Briand L (2012) A hitchhiker’s guide to statistical tests for assessing randomized algorithms in software engineering. Softw Test Verif Rel (STVR). doi:10.1002/stvr.1486 Arcuri A, Briand L (2012) A hitchhiker’s guide to statistical tests for assessing randomized algorithms in software engineering. Softw Test Verif Rel (STVR). doi:10.​1002/​stvr.​1486
Zurück zum Zitat Arcuri A, Iqbal MZ, Briand L (2012) Random testing: theoretical results and practical implications. IEEE Trans Softw Eng (TSE) 38(2):258–277CrossRef Arcuri A, Iqbal MZ, Briand L (2012) Random testing: theoretical results and practical implications. IEEE Trans Softw Eng (TSE) 38(2):258–277CrossRef
Zurück zum Zitat Barr E, Vo T, Le V, Su Z (2013) Automatic detection of floating-point exceptions. In: Proceedings of the international conference on principles of programming languages (POPL’13). ACM Barr E, Vo T, Le V, Su Z (2013) Automatic detection of floating-point exceptions. In: Proceedings of the international conference on principles of programming languages (POPL’13). ACM
Zurück zum Zitat Bauersfeld S, Vos T, Lakhotiay K, Poulding S, Condori N (2013) Unit testing tool competition. In: International workshop on search-based software testing (SBST) Bauersfeld S, Vos T, Lakhotiay K, Poulding S, Condori N (2013) Unit testing tool competition. In: International workshop on search-based software testing (SBST)
Zurück zum Zitat Bhattacharya N, Sakti A, Antoniol G, Guéhéneuc YG, Pesant G (2011) Divide-by-zero exception raising via branch coverage. In: Proceedings of the third international conference on search based software engineering, SSBSE’11. Springer, Berlin, Heidelberg, pp 204–218 Bhattacharya N, Sakti A, Antoniol G, Guéhéneuc YG, Pesant G (2011) Divide-by-zero exception raising via branch coverage. In: Proceedings of the third international conference on search based software engineering, SSBSE’11. Springer, Berlin, Heidelberg, pp 204–218
Zurück zum Zitat Clarke LA (1976) A system to generate test data and symbolically execute programs. IEEE Trans Softw Eng (TSE) 2(3):215–222CrossRef Clarke LA (1976) A system to generate test data and symbolically execute programs. IEEE Trans Softw Eng (TSE) 2(3):215–222CrossRef
Zurück zum Zitat Cowles M, Davis C (1982) On the origins of the .05 level of statistical significance. Am Psychol 37(5):553–558CrossRef Cowles M, Davis C (1982) On the origins of the .05 level of statistical significance. Am Psychol 37(5):553–558CrossRef
Zurück zum Zitat Del Grosso C, Antoniol G, Merlo E, Galinier P (2008) Detecting buffer overflow via automatic test input data generation. Comput Oper Res 35(10):3125–3143CrossRef Del Grosso C, Antoniol G, Merlo E, Galinier P (2008) Detecting buffer overflow via automatic test input data generation. Comput Oper Res 35(10):3125–3143CrossRef
Zurück zum Zitat Duran JW, Ntafos SC (1984) An evaluation of random testing. IEEE Trans Softw Eng (TSE) 10(4):438–444CrossRef Duran JW, Ntafos SC (1984) An evaluation of random testing. IEEE Trans Softw Eng (TSE) 10(4):438–444CrossRef
Zurück zum Zitat Feller W (1968) An introduction to probability theory and its applications, vol 1, 3 edn. Wiley Feller W (1968) An introduction to probability theory and its applications, vol 1, 3 edn. Wiley
Zurück zum Zitat Fraser G, Arcuri A (2011a) EvoSuite: automatic test suite generation for object-oriented software. In: ACM symposium on the foundations of software engineering (FSE), pp 416–419 Fraser G, Arcuri A (2011a) EvoSuite: automatic test suite generation for object-oriented software. In: ACM symposium on the foundations of software engineering (FSE), pp 416–419
Zurück zum Zitat Fraser G, Arcuri A (2011b) It is not the length that matters, it is how you control it. In: IEEE International conference on software testing, verification and validation (ICST), pp 150–159 Fraser G, Arcuri A (2011b) It is not the length that matters, it is how you control it. In: IEEE International conference on software testing, verification and validation (ICST), pp 150–159
Zurück zum Zitat Fraser G, Arcuri A (2012a) The seed is strong: seeding strategies in search-based software testing. In: IEEE International conference on software testing, verification and validation (ICST), pp 121–130 Fraser G, Arcuri A (2012a) The seed is strong: seeding strategies in search-based software testing. In: IEEE International conference on software testing, verification and validation (ICST), pp 121–130
Zurück zum Zitat Fraser G, Arcuri A (2012b) Sound empirical evidence in software testing. In: ACM/IEEE International conference on software engineering (ICSE), pp 178–188 Fraser G, Arcuri A (2012b) Sound empirical evidence in software testing. In: ACM/IEEE International conference on software engineering (ICSE), pp 178–188
Zurück zum Zitat Fraser G, Arcuri A (2013a) EvoSuite: on the challenges of test case generation in the real world (tool paper). In: IEEE International conference on software testing, verification and validation (ICST) Fraser G, Arcuri A (2013a) EvoSuite: on the challenges of test case generation in the real world (tool paper). In: IEEE International conference on software testing, verification and validation (ICST)
Zurück zum Zitat Fraser G, Arcuri A (2013b) Whole test suite generation. IEEE Trans Softw Eng 39(2):276–291CrossRef Fraser G, Arcuri A (2013b) Whole test suite generation. IEEE Trans Softw Eng 39(2):276–291CrossRef
Zurück zum Zitat Fraser G, Arcuri A, McMinn P (2013) Test suite generation with memetic algorithms. In: Genetic and evolutionary computation conference (GECCO) Fraser G, Arcuri A, McMinn P (2013) Test suite generation with memetic algorithms. In: Genetic and evolutionary computation conference (GECCO)
Zurück zum Zitat Godefroid P, Klarlund N, Sen K (2005) Dart: directed automated random testing. In: ACM conference on programming language design and implementation (PLDI), pp 213–223 Godefroid P, Klarlund N, Sen K (2005) Dart: directed automated random testing. In: ACM conference on programming language design and implementation (PLDI), pp 213–223
Zurück zum Zitat Godefroid P, Levin MY, Molnar DA (2008) Active property checking. In: Proceedings of the 8th ACM international conference on Embedded software, EMSOFT ’08. ACM, New York, pp 207–216 Godefroid P, Levin MY, Molnar DA (2008) Active property checking. In: Proceedings of the 8th ACM international conference on Embedded software, EMSOFT ’08. ACM, New York, pp 207–216
Zurück zum Zitat Gross F, Fraser G, Zeller A (2012) Search-based system testing: high coverage, no false alarms. In: ACM Int. symposium on software testing and analysis (ISSTA) Gross F, Fraser G, Zeller A (2012) Search-based system testing: high coverage, no false alarms. In: ACM Int. symposium on software testing and analysis (ISSTA)
Zurück zum Zitat Korel B, Al-Yami AM (1996) Assertion-oriented automated test data generation. In: Proceedings of the 18th international conference on software engineering, ICSE ’96. IEEE Computer Society, Washington, pp 71–80 Korel B, Al-Yami AM (1996) Assertion-oriented automated test data generation. In: Proceedings of the 18th international conference on software engineering, ICSE ’96. IEEE Computer Society, Washington, pp 71–80
Zurück zum Zitat Lakhotia K, Harman M, Gross H (2010a) AUSTIN: a tool for search based software testing for the C language and its evaluation on deployed automotive systems. In: International symposium on search based software engineering (SSBSE), pp 101–110 Lakhotia K, Harman M, Gross H (2010a) AUSTIN: a tool for search based software testing for the C language and its evaluation on deployed automotive systems. In: International symposium on search based software engineering (SSBSE), pp 101–110
Zurück zum Zitat Lakhotia K, McMinn P, Harman M (2010b) An empirical investigation into branch coverage for c programs using cute and austin. J Syst Softw 83(12):2379–2391CrossRef Lakhotia K, McMinn P, Harman M (2010b) An empirical investigation into branch coverage for c programs using cute and austin. J Syst Softw 83(12):2379–2391CrossRef
Zurück zum Zitat Malburg J, Fraser G (2011) Combining search-based and constraint-based testing. In: IEEE/ACM int. conference on automated software engineering (ASE) Malburg J, Fraser G (2011) Combining search-based and constraint-based testing. In: IEEE/ACM int. conference on automated software engineering (ASE)
Zurück zum Zitat McMinn P (2004) Search-based software test data generation: a survey. Softw Test Verif Rel (STVR) 14(2):105–156CrossRef McMinn P (2004) Search-based software test data generation: a survey. Softw Test Verif Rel (STVR) 14(2):105–156CrossRef
Zurück zum Zitat McMinn P (2007) Iguana: input generation using automated novel algorithms. a plug and play research tool. Tech. rep., The University of Sheffield McMinn P (2007) Iguana: input generation using automated novel algorithms. a plug and play research tool. Tech. rep., The University of Sheffield
Zurück zum Zitat McMinn P (2009) Search-based failure discovery using testability transformations to generate pseudo-oracles. In: Proceedings of the 11th annual conference on genetic and evolutionary computation, genetic and evolutionary computation conference (GECCO). ACM, New York, pp 1689–1696 McMinn P (2009) Search-based failure discovery using testability transformations to generate pseudo-oracles. In: Proceedings of the 11th annual conference on genetic and evolutionary computation, genetic and evolutionary computation conference (GECCO). ACM, New York, pp 1689–1696
Zurück zum Zitat Meyer B, Ciupa I, Leitner A, Liu LL (2007) Automatic testing of object-oriented software. In: Proceedings of the 33rd conference on current trends in theory and practice of computer science, SOFSEM ’07. Springer, Berlin, Heidelberg, pp 114–129 Meyer B, Ciupa I, Leitner A, Liu LL (2007) Automatic testing of object-oriented software. In: Proceedings of the 33rd conference on current trends in theory and practice of computer science, SOFSEM ’07. Springer, Berlin, Heidelberg, pp 114–129
Zurück zum Zitat Orso A, Xie T (2008) Bert: behavioral regression testing. In: Proceedings of the 2008 international workshop on dynamic analysis: held in conjunction with the ACM SIGSOFT International symposium on software testing and analysis (ISSTA 2008), WODA ’08. ACM, New York, pp 36–42. doi:10.1145/1401827.1401835 Orso A, Xie T (2008) Bert: behavioral regression testing. In: Proceedings of the 2008 international workshop on dynamic analysis: held in conjunction with the ACM SIGSOFT International symposium on software testing and analysis (ISSTA 2008), WODA ’08. ACM, New York, pp 36–42. doi:10.​1145/​1401827.​1401835
Zurück zum Zitat Pacheco C, Ernst MD (2005) Eclat: automatic generation and classification of test inputs. In: ECOOP 2005—object-oriented programming, 19th European conference, pp 504–527 Pacheco C, Ernst MD (2005) Eclat: automatic generation and classification of test inputs. In: ECOOP 2005—object-oriented programming, 19th European conference, pp 504–527
Zurück zum Zitat Pacheco C, Lahiri SK, Ernst MD, Ball T (2007) Feedback-directed random test generation. In: ACM/IEEE International conference on software engineering (ICSE), pp 75–84 Pacheco C, Lahiri SK, Ernst MD, Ball T (2007) Feedback-directed random test generation. In: ACM/IEEE International conference on software engineering (ICSE), pp 75–84
Zurück zum Zitat Pandita R, Xie T, Tillmann N, de Halleux J (2010) Guided test generation for coverage criteria. In: IEEE International conference on software maintenance (ICSM), pp 1–10 Pandita R, Xie T, Tillmann N, de Halleux J (2010) Guided test generation for coverage criteria. In: IEEE International conference on software maintenance (ICSM), pp 1–10
Zurück zum Zitat R Development Core Team (2008) R: a language and environment for statistical computing. R Foundation for Statistical Computing, Vienna. http://www.R-project.org. ISBN 3-900051-07-0 R Development Core Team (2008) R: a language and environment for statistical computing. R Foundation for Statistical Computing, Vienna. http://​www.​R-project.​org. ISBN 3-900051-07-0
Zurück zum Zitat Romano D, Di Penta M, Antoniol G (2011) An approach for search based testing of null pointer exceptions. In: Proceedings of the 2011 fourth IEEE international conference on software testing, verification and validation, ICST ’11. IEEE Computer Society, Washington, pp 160–169 Romano D, Di Penta M, Antoniol G (2011) An approach for search based testing of null pointer exceptions. In: Proceedings of the 2011 fourth IEEE international conference on software testing, verification and validation, ICST ’11. IEEE Computer Society, Washington, pp 160–169
Zurück zum Zitat Sen K, Marinov D, Agha G (2005) CUTE: a concolic unit testing engine for C. In: ESEC/FSE-13: proc. of the 10th European software engineering conf. held jointly with 13th ACM SIGSOFT int. symposium on foundations of software engineering. ACM, pp 263–272 Sen K, Marinov D, Agha G (2005) CUTE: a concolic unit testing engine for C. In: ESEC/FSE-13: proc. of the 10th European software engineering conf. held jointly with 13th ACM SIGSOFT int. symposium on foundations of software engineering. ACM, pp 263–272
Zurück zum Zitat Tillmann N, de Halleux NJ (2008) Pex—white box test generation for .NET. In: International conference on Tests and Proofs (TAP), pp 134–253 Tillmann N, de Halleux NJ (2008) Pex—white box test generation for .NET. In: International conference on Tests and Proofs (TAP), pp 134–253
Zurück zum Zitat Tracey N, Clark J, Mander K, McDermid J (2000) Automated test-data generation for exception conditions. Softw Pract Exper 30(1):61–79CrossRef Tracey N, Clark J, Mander K, McDermid J (2000) Automated test-data generation for exception conditions. Softw Pract Exper 30(1):61–79CrossRef
Zurück zum Zitat Visser W, Pasareanu CS, Khurshid S (2004) Test input generation with Java PathFinder. ACM SIGSOFT 29(4):97–107CrossRef Visser W, Pasareanu CS, Khurshid S (2004) Test input generation with Java PathFinder. ACM SIGSOFT 29(4):97–107CrossRef
Zurück zum Zitat Williams N, Marre B, Mouy P, Roger M (2005) PathCrawler: automatic generation of path tests by combining static and dynamic analysis. In: EDCC’05: proceedings of the 5th European dependable computing conference. LNCS, vol 3463. Springer, pp 281–292 Williams N, Marre B, Mouy P, Roger M (2005) PathCrawler: automatic generation of path tests by combining static and dynamic analysis. In: EDCC’05: proceedings of the 5th European dependable computing conference. LNCS, vol 3463. Springer, pp 281–292
Zurück zum Zitat Xiao X, Xie T, Tillmann N, de Halleux J (2011) Precise identification of problems for structural test generation. In: Proceeding of the 33rd international conference on software engineering, ICSE ’11. ACM, New York, pp 611–620 Xiao X, Xie T, Tillmann N, de Halleux J (2011) Precise identification of problems for structural test generation. In: Proceeding of the 33rd international conference on software engineering, ICSE ’11. ACM, New York, pp 611–620
Metadaten
Titel
1600 faults in 100 projects: automatically finding faults while achieving high coverage with EvoSuite
Publikationsdatum
01.06.2015
Erschienen in
Empirical Software Engineering / Ausgabe 3/2015
Print ISSN: 1382-3256
Elektronische ISSN: 1573-7616
DOI
https://doi.org/10.1007/s10664-013-9288-2

Weitere Artikel der Ausgabe 3/2015

Empirical Software Engineering 3/2015 Zur Ausgabe