Search in sources :

Example 6 with RandomLengthTestFactory

use of org.evosuite.testcase.factories.RandomLengthTestFactory in project evosuite by EvoSuite.

the class FixedSizeTestSuiteChromosomeFactory method getChromosome.

/* (non-Javadoc)
	 * @see org.evosuite.ga.ChromosomeFactory#getChromosome()
	 */
/**
 * {@inheritDoc}
 */
@Override
public TestSuiteChromosome getChromosome() {
    TestSuiteChromosome chromosome = new TestSuiteChromosome(new RandomLengthTestFactory());
    chromosome.clearTests();
    for (int i = 0; i < size; i++) {
        TestChromosome test = testChromosomeFactory.getChromosome();
        chromosome.addTest(test);
    }
    return chromosome;
}
Also used : TestSuiteChromosome(org.evosuite.testsuite.TestSuiteChromosome) RandomLengthTestFactory(org.evosuite.testcase.factories.RandomLengthTestFactory) TestChromosome(org.evosuite.testcase.TestChromosome)

Aggregations

RandomLengthTestFactory (org.evosuite.testcase.factories.RandomLengthTestFactory)6 TestSuiteChromosome (org.evosuite.testsuite.TestSuiteChromosome)4 TestChromosome (org.evosuite.testcase.TestChromosome)3 ArchiveTestChromosomeFactory (org.evosuite.ga.archive.ArchiveTestChromosomeFactory)2 AllMethodsTestChromosomeFactory (org.evosuite.testcase.factories.AllMethodsTestChromosomeFactory)2 JUnitTestCarvedChromosomeFactory (org.evosuite.testcase.factories.JUnitTestCarvedChromosomeFactory)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 TestFitnessFactory (org.evosuite.coverage.TestFitnessFactory)1 ChromosomeFactory (org.evosuite.ga.ChromosomeFactory)1 RegressionTestSuiteChromosomeFactory (org.evosuite.regression.RegressionTestSuiteChromosomeFactory)1 TestFitnessFunction (org.evosuite.testcase.TestFitnessFunction)1 CodeUnderTestException (org.evosuite.testcase.execution.CodeUnderTestException)1 ExecutionResult (org.evosuite.testcase.execution.ExecutionResult)1 TestCaseExecutor (org.evosuite.testcase.execution.TestCaseExecutor)1 UncompilableCodeException (org.evosuite.testcase.execution.UncompilableCodeException)1 SerializationSuiteChromosomeFactory (org.evosuite.testsuite.factories.SerializationSuiteChromosomeFactory)1 TestSuiteChromosomeFactory (org.evosuite.testsuite.factories.TestSuiteChromosomeFactory)1