Search in sources :

Example 1 with AVMTestCaseLocalSearch

use of org.evosuite.testcase.localsearch.AVMTestCaseLocalSearch in project evosuite by EvoSuite.

the class TestSuiteLocalSearch method applyAVM.

/**
 * Applies AVM on the test case in the suite
 *
 * @param suite
 * @param testIndex
 * @param test
 * @param localSearchObjective
 * @return
 */
private boolean applyAVM(TestSuiteChromosome suite, int testIndex, TestChromosome test, LocalSearchObjective<TestSuiteChromosome> objective) {
    logger.debug("Local search on test " + testIndex + ", current fitness: " + suite.getFitness());
    final List<FitnessFunction<? extends Chromosome>> fitnessFunctions = objective.getFitnessFunctions();
    TestSuiteLocalSearchObjective testCaseLocalSearchObjective = TestSuiteLocalSearchObjective.buildNewTestSuiteLocalSearchObjective(fitnessFunctions, suite, testIndex);
    AVMTestCaseLocalSearch testCaselocalSearch = new AVMTestCaseLocalSearch();
    boolean improved = testCaselocalSearch.doSearch(test, testCaseLocalSearchObjective);
    return improved;
}
Also used : Chromosome(org.evosuite.ga.Chromosome) TestChromosome(org.evosuite.testcase.TestChromosome) TestSuiteChromosome(org.evosuite.testsuite.TestSuiteChromosome) AVMTestCaseLocalSearch(org.evosuite.testcase.localsearch.AVMTestCaseLocalSearch) FitnessFunction(org.evosuite.ga.FitnessFunction) TestSuiteFitnessFunction(org.evosuite.testsuite.TestSuiteFitnessFunction)

Aggregations

Chromosome (org.evosuite.ga.Chromosome)1 FitnessFunction (org.evosuite.ga.FitnessFunction)1 TestChromosome (org.evosuite.testcase.TestChromosome)1 AVMTestCaseLocalSearch (org.evosuite.testcase.localsearch.AVMTestCaseLocalSearch)1 TestSuiteChromosome (org.evosuite.testsuite.TestSuiteChromosome)1 TestSuiteFitnessFunction (org.evosuite.testsuite.TestSuiteFitnessFunction)1