public static class JUnitTestRunner.Listener
extends org.junit.runner.notification.RunListener
RunListener that listens for JUnit run events
and forwards them on the the RemoteChannel as JUnitTestListener.Events.| Constructor and Description |
|---|
Listener() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkClassChange(org.junit.runner.Description description)
Determine from the
Description whether the Class being
tested has changed. |
Long |
getClassStartTime()
Obtain the start time of the current test class.
|
String |
getCurrentTestClass()
Obtain the name of the current test class.
|
Long |
getRunStartTime()
Obtain the start time of the current test run.
|
org.junit.runner.Description |
getTestRunDescription()
Obtain the
Description of the current test run. |
Long |
getTestStartTime()
Obtain the start time of the current test.
|
Boolean |
hasTestFailed()
Determine whether the current test has failed.
|
protected void |
raiseEvent(JUnitTestListener.Event event)
Raise the specified
JUnitTestListener.Event on
the JUnitTestRunner.STREAM_NAME event stream. |
void |
setTestFailed(boolean failed)
Set whether the current test has failed.
|
void |
testAssumptionFailure(org.junit.runner.notification.Failure failure) |
void |
testFailure(org.junit.runner.notification.Failure failure) |
void |
testFinished(org.junit.runner.Description description) |
void |
testIgnored(org.junit.runner.Description description) |
void |
testRunFinished(org.junit.runner.Result result) |
void |
testRunStarted(org.junit.runner.Description description) |
void |
testStarted(org.junit.runner.Description description) |
public org.junit.runner.Description getTestRunDescription()
Description of the current test run.Description of the current test runpublic String getCurrentTestClass()
public Long getClassStartTime()
public Long getRunStartTime()
public Long getTestStartTime()
public Boolean hasTestFailed()
true if the current test
has failed, otherwise falsepublic void setTestFailed(boolean failed)
failed - true if the test has
failed, false if the
test has not failedpublic void testRunStarted(org.junit.runner.Description description)
throws Exception
testRunStarted in class org.junit.runner.notification.RunListenerExceptionpublic void testRunFinished(org.junit.runner.Result result)
throws Exception
testRunFinished in class org.junit.runner.notification.RunListenerExceptionpublic void testStarted(org.junit.runner.Description description)
throws Exception
testStarted in class org.junit.runner.notification.RunListenerExceptionpublic void testFinished(org.junit.runner.Description description)
throws Exception
testFinished in class org.junit.runner.notification.RunListenerExceptionpublic void testIgnored(org.junit.runner.Description description)
throws Exception
testIgnored in class org.junit.runner.notification.RunListenerExceptionpublic void testAssumptionFailure(org.junit.runner.notification.Failure failure)
testAssumptionFailure in class org.junit.runner.notification.RunListenerpublic void testFailure(org.junit.runner.notification.Failure failure)
throws Exception
testFailure in class org.junit.runner.notification.RunListenerExceptionprotected void checkClassChange(org.junit.runner.Description description)
Description whether the Class being
tested has changed.
If the the previous test class is not null then a JUnitTestListener.Event
will be raised to signal the end of that class.
If the class has changed the a JUnitTestListener.Event will be raised
to signify the start of a test class.
description - the JUnit Description to use to check for a
change of test Class.protected void raiseEvent(JUnitTestListener.Event event)
JUnitTestListener.Event on
the JUnitTestRunner.STREAM_NAME event stream.event - the JUnitTestListener.Event to raiseCopyright © 2017. All rights reserved.