public abstract class TestFitnessFunction extends FitnessFunction<TestChromosome> implements Comparable<TestFitnessFunction>
logger| Constructor and Description |
|---|
TestFitnessFunction() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
compareClassName(TestFitnessFunction other) |
abstract int |
compareTo(TestFitnessFunction other)
Used to preorder goals by difficulty
|
abstract boolean |
equals(Object other) |
double |
getFitness(TestChromosome individual)
Calculate and set fitness function #TODO the 'set fitness' part should be
done by some abstract super class of all FitnessFunctions
|
abstract double |
getFitness(TestChromosome individual,
ExecutionResult result)
getFitness
|
abstract String |
getTargetClass() |
abstract String |
getTargetMethod() |
abstract int |
hashCode() |
boolean |
isCovered(ExecutionResult result)
Helper function if this is used without a chromosome
|
boolean |
isCovered(List<TestCase> tests)
Determine if there is an existing test case covering this goal
|
boolean |
isCovered(TestCase test)
isCovered
|
boolean |
isCovered(TestChromosome tc)
isCovered
|
boolean |
isCovered(TestChromosome individual,
ExecutionResult result)
isCovered
|
boolean |
isCoveredBy(TestSuiteChromosome testSuite) |
boolean |
isCoveredByResults(List<ExecutionResult> tests)
Determine if there is an existing test case covering this goal
|
boolean |
isMaximizationFunction()
Do we need to maximize, or minimize this function?
|
ExecutionResult |
runTest(TestCase test) |
getBestStoredIndividual, normalize, updateCoveredGoals, updateIndividual, updateIndividualpublic abstract double getFitness(TestChromosome individual, ExecutionResult result)
getFitness
individual - a TestChromosome object.result - a ExecutionResult object.public double getFitness(TestChromosome individual)
getFitness in class FitnessFunction<TestChromosome>individual - a Chromosome object.public abstract int compareTo(TestFitnessFunction other)
compareTo in interface Comparable<TestFitnessFunction>protected final int compareClassName(TestFitnessFunction other)
public ExecutionResult runTest(TestCase test)
public boolean isCovered(List<TestCase> tests)
tests - a List object.public boolean isCoveredByResults(List<ExecutionResult> tests)
tests - a List object.public boolean isCoveredBy(TestSuiteChromosome testSuite)
public boolean isCovered(TestCase test)
isCovered
test - a TestCase object.public boolean isCovered(TestChromosome tc)
isCovered
tc - a TestChromosome object.public boolean isCovered(TestChromosome individual, ExecutionResult result)
isCovered
individual - a TestChromosome object.result - a ExecutionResult object.public boolean isCovered(ExecutionResult result)
result - public boolean isMaximizationFunction()
isMaximizationFunction in class FitnessFunction<TestChromosome>public abstract String getTargetClass()
public abstract String getTargetMethod()
Copyright © 2010–2017 EvoSuite. All rights reserved.