This site is to provide developer documentation for EvoObj [1] and by extension EvoSuite [2]. This site has been created for educational purposes only and is in no way endorsed or acknowledge by EvoObj nor EvoSuite.
EvoObj/EvoSuite Background
EvoSuite is a well known Search Based Test Generation tool to automatically produce testcases for a program. EvoObj extended EvoSuite by building an Object Construction Graph in order to produce better seeds for programs with object type inputs. Although EvoSuite provides documentation of how to extend it, the examples provided demonstrate how to make modular modifications such as adjusting fitness functions or genetic algorithm operators. Below is an end to end workflow of what happens when invoking EvoSuite, including the modifications provided by EvoObj.
EvoSuite Workflow
This workflow assumes that -Dstrategy==EVOSUITE in order to kick off Whole Test Suite generation. It also assumes that -Dalgorithm==MONOTONIC_GA. Using alternative strategies and algorithms will cause slightly different execution paths, however understanding this flow will help when understanding how the more complicated strategies work.
Confusing Points
TestSuite vs TestCase/TestChromosome
A TestSuiteChromosome is made up of many TestChromosomes. Each TestChromosome has a 1:1 correspondance with a TestCase.
-
TestSuiteFitness vs FitnessFactory
TestSuiteFitnessFunctions evaluates fitness for a TestSuiteChromosome. A FitnessFactory extends AbstractFitnessFactory which implements TestFitnessFactory these also get fitness of a TestSuiteChromosome. However, each one of these factories takes a specific implementation of TestFitnessFunction. These FitnessFunctions get the fitness for a TestChromosome. The advantage of a FitnessFactory is that they can return coverage goals whereas TestSuiteFitnessFunctions only return fitness.