public class TestRunnable extends Object implements InterfaceTestRunnable
TestRunnable class.
| Modifier and Type | Field and Description |
|---|---|
protected Map<Integer,Throwable> |
exceptionsThrown
Map a thrown exception ('value') with the the position ('key') in the
test sequence in which it was thrown from.
|
protected Set<ExecutionObserver> |
observers |
protected boolean |
runFinished |
protected ThreadStopper |
threadStopper |
| Constructor and Description |
|---|
TestRunnable(TestCase tc,
Scope scope,
Set<ExecutionObserver> observers)
Constructor for TestRunnable.
|
| Modifier and Type | Method and Description |
|---|---|
ExecutionResult |
call() |
Map<Integer,Throwable> |
getExceptionsThrown()
getExceptionsThrown
|
protected void |
informObservers_after(Statement s,
Throwable exceptionThrown)
Inform all observers that input statement has been executed
|
protected void |
informObservers_before(Statement s)
Inform all observers that we are going to execute the input statement
|
protected void |
informObservers_finished(ExecutionResult result) |
boolean |
isRunFinished()
isRunFinished
|
void |
killAndJoinClientThreads()
Try to kill (and then join) the SUT threads.
|
void |
storeCurrentThreads()
After the test case is executed, if any SUT thread is still running, we
will wait for their termination.
|
protected boolean runFinished
protected Map<Integer,Throwable> exceptionsThrown
protected Set<ExecutionObserver> observers
protected final ThreadStopper threadStopper
public void storeCurrentThreads()
After the test case is executed, if any SUT thread is still running, we will wait for their termination. To identify which thread belong to SUT, before test case execution we should check which are the threads that are running.
WARNING: The sandbox might prevent accessing thread informations, so best to call this method from outside this class
public void killAndJoinClientThreads()
throws IllegalStateException
IllegalStateExceptionprotected void informObservers_before(Statement s)
s - the statement to executeprotected void informObservers_after(Statement s, Throwable exceptionThrown)
s - the executed statementexceptionThrown - the exception thrown when executing the statement, if any (can
be null)protected void informObservers_finished(ExecutionResult result)
public ExecutionResult call()
call in interface Callable<ExecutionResult>public Map<Integer,Throwable> getExceptionsThrown()
getExceptionsThrown
getExceptionsThrown in interface InterfaceTestRunnableMap object.public boolean isRunFinished()
isRunFinished
isRunFinished in interface InterfaceTestRunnableCopyright © 2010–2017 EvoSuite. All rights reserved.