public final class SeqRunListener extends ExtRunListener
SeqRunListener here.RunListener.ThreadSafe| Modifier and Type | Field and Description |
|---|---|
private ExtRunListener |
runListener1 |
private ExtRunListener |
runListener2 |
| Modifier | Constructor and Description |
|---|---|
private |
SeqRunListener(ExtRunListener runListener1,
ExtRunListener runListener2) |
(package private) |
SeqRunListener(GUIRunner guiRunner) |
| Modifier and Type | Method and Description |
|---|---|
void |
testAssumptionFailure(Failure failure)
Called when an atomic test flags
that it assumes a condition that is false.
|
void |
testClassStructureLoaded(Description desc)
Invoked if a test class is loaded defining a testsuite
described by
desc. |
void |
testFailure(Failure failure)
Called when an atomic test fails to execute properly
throwing a Throwable, or when a listener throws an exception.
|
void |
testFinished(Description desc)
Called when an atomic test has finished,
whether the test succeeds or fails.
|
void |
testIgnored(Description desc)
Called when a test will not be run,
generally because a test method is annotated
with
Ignore. |
void |
testRunAborted()
Invoked for stop and for break originated by the user.
|
void |
testRunFinished(Result result)
Called when all tests of the suite
announced by
testRunStarted(Description) have finished. |
void |
testRunStarted(Description desc)
Called before any tests
of a suite described by
desc have been run. |
void |
testStarted(Description desc)
Called when an atomic test is about to be started.
|
void |
testSuiteFinished(Description desc)
Called when a test suite has finished,
whether the test suite succeeds or fails.
|
void |
testSuiteStarted(Description desc)
Called when a test suite is about to be started.
|
private final ExtRunListener runListener1
private final ExtRunListener runListener2
private SeqRunListener(ExtRunListener runListener1, ExtRunListener runListener2)
SeqRunListener(GUIRunner guiRunner)
public void testRunStarted(Description desc) throws Exception
desc have been run.
This may be called on an arbitrary thread.testRunStarted in class RunListenerdesc - describes the suite of tests to be run.Exceptionpublic void testRunFinished(Result result) throws Exception
testRunStarted(Description) have finished.
This may be called on an arbitrary thread.testRunFinished in class RunListenerresult - the summary of the outcoming of the suite of tests run,
including all the tests that failedExceptionpublic void testSuiteStarted(Description desc) throws Exception
Description,
then testSuiteFinished(Description)
will also be called for the same Description.
Note that not all runners will call this method, so runners should
be prepared to handle testStarted(Description) calls for tests
where there was no corresponding testSuiteStarted(Description)
call for the parent Description.
testSuiteStarted in class ExtRunListenerdesc - the description of the test suite that is about to be run
(generally a class name)Exceptionpublic void testSuiteFinished(Description desc) throws Exception
Description
unless testSuiteStarted(Description) was called
for the same Description.testSuiteFinished in class ExtRunListenerdesc - the description of the test suite that just ranExceptionpublic void testStarted(Description desc) throws Exception
testStarted in class RunListenerdesc - the description of the test that is about to be run
(generally a class and method name)ExceptiontestIgnored(Description)public void testFinished(Description desc) throws Exception
testStarted(Description) before.
An ignored test is never finished.testFinished in class RunListenerdesc - the description of the test that just ranExceptiontestIgnored(Description)public void testFailure(Failure failure) throws Exception
In the case of a failure of an atomic test,
this method is invoked after testStarted(Description)
and before testFinished(Description)
with the according description of failure
from the same thread that called testStarted(Description).
In case of a failed assumption, instead of this method
testAssumptionFailure(Failure) is invoked
for the according test.
In the case of a listener throwing an exception,
this method will be called with the description of failure
given by Description.TEST_MECHANISM,
and may be called on an arbitrary thread.
testFailure in class RunListenerfailure - describes the test that failed and the exception that was thrown
or indicates that a listener has thrown an exception
and the according exception.Exceptionpublic void testAssumptionFailure(Failure failure)
testStarted(Description)
and before testFinished(Description)
with the according description of failure.
A failed assertion does not count as a failure
and so testFailure(Failure) is not invoked
for the according test.
CAUTION: Although a failed assertion is like an ignored test,
testRunFinished(Result) does not count this as ignored test
but rather than a passed test.
testAssumptionFailure in class RunListenerfailure - describes the test that failed
and the AssumptionViolatedException that was thrown.testIgnored(Description)public void testIgnored(Description desc) throws Exception
Ignore.
This implies
that neither testStarted(Description)
nor testFinished(Description) are invoked
for the according test.
This in turn implies that neither testFailure(Failure)
nor testAssumptionFailure(Failure) are invoked.testIgnored in class RunListenerdesc - describes the test that will not be runExceptionpublic void testRunAborted()
testRunAborted in class ExtRunListenerpublic void testClassStructureLoaded(Description desc)
desc.testClassStructureLoaded in class ExtRunListenerCopyright © 2012–2018 Simuline Organization (l2r). All rights reserved.