public abstract class MutationAssertionGenerator extends AssertionGenerator
| Modifier and Type | Field and Description |
|---|---|
protected static ArrayTraceObserver |
arrayObserver |
protected static ComparisonTraceObserver |
comparisonObserver |
protected static Map<Mutation,Integer> |
exceptionMutations |
protected static PrimitiveFieldTraceObserver |
fieldObserver |
protected static InspectorTraceObserver |
inspectorObserver |
protected Map<Integer,Mutation> |
mutants |
protected static NullTraceObserver |
nullObserver |
protected static Class<?>[] |
observerClasses
Constant
observerClasses |
protected Properties.Criterion[] |
oldCriterion |
protected static PrimitiveTraceObserver |
primitiveObserver |
protected static SameTraceObserver |
sameObserver |
protected static Map<Mutation,Integer> |
timedOutMutations |
| Constructor and Description |
|---|
MutationAssertionGenerator()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAssertions(TestCase test)
addAssertions
|
protected void |
calculateMutationScore(Set<Integer> tkilled)
We send status about the mutation score when we're done, because we know
it
|
protected void |
filterInspectorPrimitiveDuplication(Statement statement)
Remove inspector assertions that follow method calls of the same method
|
protected void |
filterRedundantNonnullAssertions(TestCase test)
Remove assertNonNull assertions for all cases where we have further
assertions
|
protected int |
getNumKilledMutants(TestCase test,
Map<Mutation,List<OutputTrace<?>>> mutation_traces,
List<Mutation> executedMutants) |
protected boolean |
isUsedAsCallee(TestCase test,
VariableReference var)
Returns true if the variable var is used as callee later on in the test
|
protected boolean |
justNullAssertion(Statement statement)
Returns true if the statement has nothing but null assertions
|
protected boolean |
primitiveWithoutAssertion(Statement statement) |
protected void |
restoreCriterion(TestSuiteChromosome suite)
Set the criterion to whatever it was before
|
protected ExecutionResult |
runTest(TestCase test)
Execute a test case on the original unit
|
protected ExecutionResult |
runTest(TestCase test,
Mutation mutant)
Execute a test case on a mutant
|
void |
setupClassLoader(TestSuiteChromosome suite)
If we are not doing mutation testing anyway, then we need to reinstrument
the code to get the mutants now
|
addAssertions, changeClassLoader, filterFailingAssertions, filterFailingAssertions, filterFailingAssertionsprotected static final PrimitiveTraceObserver primitiveObserver
protected static final ComparisonTraceObserver comparisonObserver
protected static final SameTraceObserver sameObserver
protected static final InspectorTraceObserver inspectorObserver
protected static final PrimitiveFieldTraceObserver fieldObserver
protected static final NullTraceObserver nullObserver
protected static final ArrayTraceObserver arrayObserver
protected static Class<?>[] observerClasses
observerClassesprotected Properties.Criterion[] oldCriterion
public MutationAssertionGenerator()
protected ExecutionResult runTest(TestCase test)
runTest in class AssertionGeneratortest - The test case that should be executedExecutionResult object.protected ExecutionResult runTest(TestCase test, Mutation mutant)
test - The test case that should be executedmutant - The mutant on which the test case shall be executedpublic void setupClassLoader(TestSuiteChromosome suite)
setupClassLoader in class AssertionGeneratorsuite - protected void restoreCriterion(TestSuiteChromosome suite)
suite - protected void calculateMutationScore(Set<Integer> tkilled)
tkilled - protected int getNumKilledMutants(TestCase test, Map<Mutation,List<OutputTrace<?>>> mutation_traces, List<Mutation> executedMutants)
test - mutation_traces - executedMutants - protected boolean justNullAssertion(Statement statement)
statement - protected boolean primitiveWithoutAssertion(Statement statement)
protected boolean isUsedAsCallee(TestCase test, VariableReference var)
test - var - protected void filterRedundantNonnullAssertions(TestCase test)
test - protected void filterInspectorPrimitiveDuplication(Statement statement)
statement - public void addAssertions(TestCase test)
addAssertions
addAssertions in class AssertionGeneratortest - a TestCase object.Copyright © 2010–2017 EvoSuite. All rights reserved.