public class TestSuiteChromosome extends AbstractTestSuiteChromosome<TestChromosome>
TestSuiteChromosome class.
testChromosomeFactory, testsage, distance, rank, toBeUpdated| Modifier | Constructor and Description |
|---|---|
|
TestSuiteChromosome()
Constructor for TestSuiteChromosome.
|
|
TestSuiteChromosome(ChromosomeFactory<TestChromosome> testChromosomeFactory)
Constructor for TestSuiteChromosome.
|
protected |
TestSuiteChromosome(TestSuiteChromosome source)
Constructor for TestSuiteChromosome.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
addSecondaryObjective(SecondaryObjective<?> objective)
Add an additional secondary objective to the end of the list of
objectives
|
TestChromosome |
addTest(TestCase test)
Add a test to a test suite
|
void |
clearMutationHistory() |
void |
clearTests()
Remove all tests
|
TestSuiteChromosome |
clone()
clone
|
<T extends Chromosome> |
compareSecondaryObjective(T o)
Secondary Objectives are specific to chromosome types
|
void |
deleteTest(TestCase testCase)
For manual algorithm
|
static void |
disableFirstSecondaryObjective() |
static void |
enableFirstSecondaryObjective() |
Set<TestFitnessFunction> |
getCoveredGoals()
getCoveredGoals
|
static int |
getSecondaryObjectivesSize() |
List<TestCase> |
getTests()
getTests
|
static boolean |
isFirstSecondaryObjectiveEnabled() |
boolean |
localSearch(LocalSearchObjective<? extends Chromosome> objective)
Apply the local search
|
void |
mutate()
Apply mutation
|
static void |
removeAllSecondaryObjectives() |
void |
removeCoveredGoal(TestFitnessFunction f) |
static void |
removeSecondaryObjective(SecondaryObjective<TestSuiteChromosome> objective)
Remove secondary objective from list, if it is there
|
static void |
reverseSecondaryObjective() |
static void |
ShuffleSecondaryObjective() |
String |
toString()
Determine relative ordering of this chromosome to another chromosome If
fitness is equal, the shorter chromosome comes first
|
addTest, addTests, addUnmodifiableTest, crossOver, deleteTest, equals, getLastExecutionResults, getTestChromosome, getTestChromosomeFactory, getTestChromosomes, hashCode, setTestChromosome, size, totalLengthOfTestCasesaddFitness, addFitness, addFitness, addFitness, compareTo, crossOver, getAge, getCoverage, getCoverage, getCoverageInstanceOf, getCoverageValues, getDistance, getFitness, getFitness, getFitnessInstanceOf, getFitnessValues, getNumOfCoveredGoals, getNumOfCoveredGoals, getNumOfNotCoveredGoals, getNumOfNotCoveredGoals, getNumsNotCoveredGoals, getNumsOfCoveredGoals, getPreviousFitnessValues, getRank, hasExecutedFitness, hasFitnessChanged, hasLocalSearchBeenApplied, isChanged, isToBeUpdated, isToBeUpdated, setChanged, setCoverage, setCoverageValues, setDistance, setFitness, setFitnessValues, setLocalSearchApplied, setNumOfCoveredGoals, setNumOfNotCoveredGoals, setNumsOfCoveredGoals, setNumsOfNotCoveredGoals, setPreviousFitnessValues, setRank, updateAgepublic TestSuiteChromosome()
Constructor for TestSuiteChromosome.
public TestSuiteChromosome(ChromosomeFactory<TestChromosome> testChromosomeFactory)
Constructor for TestSuiteChromosome.
testChromosomeFactory - a ChromosomeFactory object.protected TestSuiteChromosome(TestSuiteChromosome source)
Constructor for TestSuiteChromosome.
source - a TestSuiteChromosome object.public static void addSecondaryObjective(SecondaryObjective<?> objective)
objective - a SecondaryObjective object.public static void ShuffleSecondaryObjective()
public static int getSecondaryObjectivesSize()
public static boolean isFirstSecondaryObjectiveEnabled()
public static void disableFirstSecondaryObjective()
public static void enableFirstSecondaryObjective()
public static void reverseSecondaryObjective()
public static void removeSecondaryObjective(SecondaryObjective<TestSuiteChromosome> objective)
objective - a SecondaryObjective object.public static void removeAllSecondaryObjectives()
public TestChromosome addTest(TestCase test)
test - a TestCase object.public void clearMutationHistory()
public void clearTests()
public TestSuiteChromosome clone()
clone
Create a deep copy of the chromosome Create a deep copy of this test suiteclone in interface PublicCloneable<Chromosome>clone in class AbstractTestSuiteChromosome<TestChromosome>public <T extends Chromosome> int compareSecondaryObjective(T o)
compareSecondaryObjective in class Chromosomeo - a Chromosome object.public void deleteTest(TestCase testCase)
testCase - to removepublic Set<TestFitnessFunction> getCoveredGoals()
getCoveredGoals
Set object.public void removeCoveredGoal(TestFitnessFunction f)
public boolean localSearch(LocalSearchObjective<? extends Chromosome> objective)
AbstractTestSuiteChromosomelocalSearch in class AbstractTestSuiteChromosome<TestChromosome>objective - a LocalSearchObjective
object.public void mutate()
mutate in class AbstractTestSuiteChromosome<TestChromosome>Copyright © 2010–2017 EvoSuite. All rights reserved.