| Modifier and Type | Field and Description |
|---|---|
protected Map<Integer,Throwable> |
exceptions
Map statement number to raised exception
|
protected int |
executedStatements
Number of statements executed
|
protected long |
executionTime
Duration of execution
|
Map<Integer,Boolean> |
explicitExceptions
Record for each exception if it was explicitly thrown
|
protected boolean |
hasSecurityException
Was there a permission denied during execution?
|
Mutation |
mutation
Mutation that was active during execution
|
protected Set<String> |
readProperties
Set of System properties that were read during test execution
|
double |
regressionObjectDistance |
TestCase |
test
Test case that produced this execution result
|
protected ExecutionTrace |
trace
Trace recorded during execution
|
protected Map<Class<?>,OutputTrace<?>> |
traces
Output traces produced by observers
|
protected boolean |
wasAnyPropertyWritten
Keep track of whether any System property was written
|
| Constructor and Description |
|---|
ExecutionResult(TestCase t)
Default constructor when executing without mutation
|
ExecutionResult(TestCase t,
Mutation m)
Constructor when executing with mutation
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
calledReflection()
Returns true if any of the executed statements was a reflection statement
|
ExecutionResult |
clone() |
Map<Integer,Throwable> |
exposeExceptionMapping()
Deprecated.
|
Collection<Throwable> |
getAllThrownExceptions()
getAllThrownExceptions
|
Map<Integer,Throwable> |
getCopyOfExceptionMapping() |
Throwable |
getExceptionThrownAtPosition(Integer position)
getExceptionThrownAtPosition
|
int |
getExecutedStatements() |
long |
getExecutionTime() |
Integer |
getFirstPositionOfThrownException()
getFirstPositionOfThrownException
|
Map<Integer,Set<InputCoverageGoal>> |
getInputGoals() |
int |
getNumberOfThrownExceptions()
getNumberOfThrownExceptions
|
Map<Integer,Set<OutputCoverageGoal>> |
getOutputGoals() |
Set<Integer> |
getPositionsWhereExceptionsWereThrown()
getPositionsWhereExceptionsWereThrown
|
Set<String> |
getReadProperties() |
ExecutionTrace |
getTrace()
Accessor to the execution trace
|
OutputTrace<?> |
getTrace(Class<?> clazz)
Accessor for output trace produced by an observer of a particular class
|
Collection<OutputTrace<?>> |
getTraces()
Accessor for the output traces produced by observers
|
boolean |
hasSecurityException()
check if the test case threw any security exception
|
boolean |
hasTestException()
Does the test contain an exception caused in the test itself?
|
boolean |
hasTimeout()
Was the reason for termination a timeout?
|
boolean |
hasUndeclaredException()
Is there an undeclared exception in the trace?
|
boolean |
isThereAnExceptionAtPosition(Integer position)
isThereAnExceptionAtPosition
|
boolean |
noThrownExceptions()
noThrownExceptions
|
void |
reportNewThrownException(Integer position,
Throwable t)
reportNewThrownException
|
void |
setExecutedStatements(int executedStatements) |
void |
setExecutionTime(long executionTime) |
void |
setInputGoals(Map<Integer,Set<InputCoverageGoal>> coveredGoals) |
void |
setOutputGoals(Map<Integer,Set<OutputCoverageGoal>> coveredGoals) |
void |
setReadProperties(Set<String> readProperties) |
void |
setSecurityException(boolean value) |
void |
setTest(TestCase tc) |
void |
setThrownExceptions(Map<Integer,Throwable> data)
Copy the input map data into internal structures
|
void |
setTrace(ExecutionTrace trace)
Set execution trace to different value
|
void |
setTrace(OutputTrace<?> trace,
Class<?> clazz)
Store a new output trace
|
void |
setWasAnyPropertyWritten(boolean wasAnyPropertyWritten) |
String |
toString() |
boolean |
wasAnyPropertyWritten() |
public TestCase test
public Mutation mutation
public Map<Integer,Boolean> explicitExceptions
FIXME: internal data structures should never be null...
protected ExecutionTrace trace
protected long executionTime
protected int executedStatements
protected boolean hasSecurityException
protected Set<String> readProperties
protected boolean wasAnyPropertyWritten
public double regressionObjectDistance
protected final Map<Class<?>,OutputTrace<?>> traces
public ExecutionResult(TestCase t)
t - a TestCase object.public int getExecutedStatements()
public void setExecutedStatements(int executedStatements)
executedStatements - the executedStatements to setpublic void setThrownExceptions(Map<Integer,Throwable> data)
Copy the input map data into internal structures
data - a Map object. It has a mapping from test
sequence position toward thrown exceptionpublic Integer getFirstPositionOfThrownException()
getFirstPositionOfThrownException
Integer object.public void reportNewThrownException(Integer position, Throwable t)
reportNewThrownException
public Set<Integer> getPositionsWhereExceptionsWereThrown()
getPositionsWhereExceptionsWereThrown
Set object.public Collection<Throwable> getAllThrownExceptions()
getAllThrownExceptions
Collection object.public boolean isThereAnExceptionAtPosition(Integer position)
isThereAnExceptionAtPosition
position - a Integer object.public boolean noThrownExceptions()
noThrownExceptions
public Throwable getExceptionThrownAtPosition(Integer position)
getExceptionThrownAtPosition
public int getNumberOfThrownExceptions()
getNumberOfThrownExceptions
@Deprecated public Map<Integer,Throwable> exposeExceptionMapping()
Map object.public Map<Integer,Throwable> getCopyOfExceptionMapping()
public ExecutionTrace getTrace()
ExecutionTrace object.public void setTrace(ExecutionTrace trace) throws IllegalArgumentException
trace - a ExecutionTrace object.IllegalArgumentExceptionpublic void setTrace(OutputTrace<?> trace, Class<?> clazz)
trace - a OutputTrace object.clazz - a Class object.public OutputTrace<?> getTrace(Class<?> clazz)
clazz - a Class object.OutputTrace object.public Collection<OutputTrace<?>> getTraces()
Collection object.public boolean hasTimeout()
public boolean hasTestException()
public boolean hasUndeclaredException()
public boolean calledReflection()
public boolean hasSecurityException()
public void setSecurityException(boolean value)
public long getExecutionTime()
public void setExecutionTime(long executionTime)
executionTime - the executionTime to setpublic ExecutionResult clone()
public boolean wasAnyPropertyWritten()
public void setWasAnyPropertyWritten(boolean wasAnyPropertyWritten)
public void setTest(TestCase tc)
public void setInputGoals(Map<Integer,Set<InputCoverageGoal>> coveredGoals)
public void setOutputGoals(Map<Integer,Set<OutputCoverageGoal>> coveredGoals)
public Map<Integer,Set<InputCoverageGoal>> getInputGoals()
public Map<Integer,Set<OutputCoverageGoal>> getOutputGoals()
Copyright © 2010–2017 EvoSuite. All rights reserved.