public class ExecutionTracer extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
checkTimeout()
Called by the instrumented code each time a new source line is executed
|
void |
clear()
Reset for new execution
|
static void |
disable()
disable
|
static void |
disableContext()
disable context instrumentation
|
static void |
disableTraceCalls()
disableTraceCalls
|
static void |
enable()
enable
|
static void |
enableContext()
enable context instrumentation
|
static void |
enableTraceCalls()
enableTraceCalls
|
static void |
enteredMethod(String classname,
String methodname,
Object caller)
Called by instrumented code whenever a new method is called
|
static void |
exceptionThrown(Object exception,
String className,
String methodName)
exceptionThrown
|
static void |
exitClassInit(String className)
This method is added in the transformed bytecode
|
static ExecutionTracer |
getExecutionTracer()
getExecutionTracer
|
Throwable |
getLastException()
Return the last explicitly thrown exception
|
int |
getNumStatementsExecuted()
getNumStatementsExecuted
|
ExecutionTrace |
getTrace()
Return trace of current execution
|
static boolean |
isEnabled()
isEnabled
|
static boolean |
isThreadNeqCurrentThread()
Obviously more than one thread is executing during the creation of
concurrent TestCases.
|
static boolean |
isTraceCallsEnabled() |
static void |
leftMethod(String classname,
String methodname)
Called by instrumented code whenever a method is left
|
static void |
passedBranch(int val,
int opcode,
int branch,
int bytecode_id)
Called by the instrumented code each time a new branch is taken
|
static void |
passedBranch(int val1,
int val2,
int opcode,
int branch,
int bytecode_id)
Called by the instrumented code each time a new branch is taken
|
static void |
passedBranch(Object val,
int opcode,
int branch,
int bytecode_id)
Called by the instrumented code each time a new branch is taken
|
static void |
passedBranch(Object val1,
Object val2,
int opcode,
int branch,
int bytecode_id)
Called by the instrumented code each time a new branch is taken
|
static void |
passedDefinition(Object object,
Object caller,
int defID)
Called by instrumented code each time a variable gets written to (a
Definition)
|
static void |
passedFieldMethodCall(Object callee,
Object caller,
int defuseId)
Called by instrumented code each time a field method call is passed
Since it was not clear whether the field method call constitutes a
definition or a use when the instrumentation was initially added this
method will redirect the call accordingly
|
static void |
passedGetStatic(String classNameWithDots,
String fieldName) |
static void |
passedLine(String className,
String methodName,
int line)
Called by the instrumented code each time a new source line is executed
|
static void |
passedMutation(double distance,
int mutationId)
passedMutation
|
static void |
passedPutStatic(String classNameWithDots,
String fieldName) |
static void |
passedUnconditionalBranch(int opcode,
int branch,
int bytecode_id)
Called by the instrumented code each time an unconditional branch is
taken.
|
static void |
passedUse(Object object,
Object caller,
int useID)
Called by instrumented code each time a variable is read from (a Use)
|
static void |
returnValue(int value,
String className,
String methodName)
Called by instrumented code whenever a return values is produced
|
static void |
returnValue(Object value,
String className,
String methodName)
Called by instrumented code whenever a return values is produced
|
static void |
setCheckCallerThread(boolean checkCallerThread)
Setter for the field
checkCallerThread. |
static void |
setKillSwitch(boolean value)
Setter for the field
killSwitch. |
static void |
setThread(Thread thread)
setThread
|
static void |
statementExecuted()
statementExecuted
|
public static void setThread(Thread thread)
setThread
thread - a Thread object.public static void disable()
disable
public static void enable()
enable
public static boolean isEnabled()
isEnabled
public static void setKillSwitch(boolean value)
Setter for the field killSwitch.
value - a boolean.public static void setCheckCallerThread(boolean checkCallerThread)
Setter for the field checkCallerThread.
checkCallerThread - a boolean.public static void enableContext()
enable context instrumentation
public static void disableContext()
disable context instrumentation
public static void disableTraceCalls()
disableTraceCalls
public static void enableTraceCalls()
enableTraceCalls
public static boolean isTraceCallsEnabled()
public static ExecutionTracer getExecutionTracer()
getExecutionTracer
ExecutionTracer object.public void clear()
public static boolean isThreadNeqCurrentThread()
public ExecutionTrace getTrace()
ExecutionTrace object.public Throwable getLastException()
Throwable object.public static void enteredMethod(String classname, String methodname, Object caller) throws TestCaseExecutor.TimeoutExceeded
classname - a String object.methodname - a String object.caller - a Object object.org.evosuite.testcase.TestCaseExecutor$TimeoutExceeded - if any.TestCaseExecutor.TimeoutExceededpublic static void returnValue(int value,
String className,
String methodName)
public static void returnValue(Object value, String className, String methodName)
public static void leftMethod(String classname, String methodname)
public static void checkTimeout()
public static void passedLine(String className, String methodName, int line)
public static void passedUnconditionalBranch(int opcode,
int branch,
int bytecode_id)
opcode - a int.branch - a int.bytecode_id - a int.public static void passedBranch(int val,
int opcode,
int branch,
int bytecode_id)
val - a int.opcode - a int.branch - a int.bytecode_id - a int.public static void exitClassInit(String className)
className - public static void passedGetStatic(String classNameWithDots, String fieldName)
classNameWithDots - fieldName - public static void passedBranch(int val1,
int val2,
int opcode,
int branch,
int bytecode_id)
val1 - a int.val2 - a int.opcode - a int.branch - a int.bytecode_id - a int.public static void passedBranch(Object val1, Object val2, int opcode, int branch, int bytecode_id)
public static void passedBranch(Object val, int opcode, int branch, int bytecode_id)
val - a Object object.opcode - a int.branch - a int.bytecode_id - a int.public static void passedDefinition(Object object, Object caller, int defID)
caller - a Object object.defID - a int.public static void passedUse(Object object, Object caller, int useID)
caller - a Object object.useID - a int.public static void passedFieldMethodCall(Object callee, Object caller, int defuseId)
caller - defuseId - public static void passedMutation(double distance,
int mutationId)
passedMutation
distance - a double.mutationId - a int.public static void exceptionThrown(Object exception, String className, String methodName)
exceptionThrown
public static void statementExecuted()
statementExecuted
public int getNumStatementsExecuted()
getNumStatementsExecuted
Copyright © 2010–2017 EvoSuite. All rights reserved.