AuthorsG. Fraser, A. Arcuri and P. McMinn
TitleA Memetic Algorithm for Whole Test Suite Generation
Afilliation, , Software Engineering
Project(s)The Certus Centre (SFI)
Publication TypeJournal Article
Year of Publication2014
JournalJournal of Systems and Software
Date Published05/2015
PublisherUniversity of Sheffield, Department of Computer Science

The generation of unit-level test cases for structural code coverage is a task well-suited to Genetic Algorithms. Method call sequences must be created that construct objects, put them into the right state and then execute uncovered code. However, the generation of primitive values, such as integers and doubles, characters that appear in strings, and arrays of primitive values, are not so straightforward. Often, small local changes are required to drive the value toward the one needed to execute some target structure. However, global searches like Genetic Algorithms tend to make larger changes that are not concentrated on any particular aspect of a test case. In this paper, we extend the Genetic Algorithm behind the EvoSuite test generation tool into a Memetic Algorithm, by equipping it with several local search operators. These operators are designed to efficiently optimize primitive values and other aspects of a test suite that allow the search for test cases to function more effectively. We evaluate our operators using a rigorous experimental methodology on over 12,000 Java classes, comprising open source classes of various different kinds, including numerical applications and text processors. Our study shows that increases in branch coverage of up to 53% are possible for an individual class in practice.

Citation KeySimula.simula.2268