java.lang.Object
org.junit.runner.notification.RunListener
net.thucydides.junit.listeners.JUnitStepListener
- Direct Known Subclasses:
ParameterizedJUnitStepListener
public class JUnitStepListener
extends org.junit.runner.notification.RunListener
Intercepts JUnit events and reports them to Thucydides.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.junit.runner.notification.RunListener
org.junit.runner.notification.RunListener.ThreadSafe -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJUnitStepListener(Class<?> testClass, net.thucydides.core.steps.BaseStepListener baseStepListener, net.thucydides.model.steps.StepListener... listeners) -
Method Summary
Modifier and TypeMethodDescriptionvoidnet.thucydides.core.steps.BaseStepListenernet.thucydides.model.domain.stacktrace.FailureCausegetError()protected Class<?> List<net.thucydides.model.domain.TestOutcome> booleanvoidvoidtestFailure(org.junit.runner.notification.Failure failure) voidtestFinished(org.junit.runner.Description description) voidtestIgnored(org.junit.runner.Description description) voidtestRunFinished(org.junit.runner.Result result) voidtestRunStarted(org.junit.runner.Description description) voidtestStarted(org.junit.runner.Description description) Called when a test starts.static JUnitStepListenerBuilderwithOutputDirectory(File outputDirectory) Methods inherited from class org.junit.runner.notification.RunListener
testAssumptionFailure, testSuiteFinished, testSuiteStarted
-
Constructor Details
-
JUnitStepListener
protected JUnitStepListener(Class<?> testClass, net.thucydides.core.steps.BaseStepListener baseStepListener, net.thucydides.model.steps.StepListener... listeners)
-
-
Method Details
-
withOutputDirectory
-
registerThucydidesListeners
public void registerThucydidesListeners() -
getBaseStepListener
public net.thucydides.core.steps.BaseStepListener getBaseStepListener() -
testRunStarted
- Overrides:
testRunStartedin classorg.junit.runner.notification.RunListener- Throws:
Exception
-
testRunFinished
- Overrides:
testRunFinishedin classorg.junit.runner.notification.RunListener- Throws:
Exception
-
testStarted
public void testStarted(org.junit.runner.Description description) Called when a test starts. We also need to start the test suite the first time, as the testRunStarted() method is not invoked for some reason.- Overrides:
testStartedin classorg.junit.runner.notification.RunListener
-
testFinished
- Overrides:
testFinishedin classorg.junit.runner.notification.RunListener- Throws:
Exception
-
testFailure
- Overrides:
testFailurein classorg.junit.runner.notification.RunListener- Throws:
Exception
-
testIgnored
- Overrides:
testIgnoredin classorg.junit.runner.notification.RunListener- Throws:
Exception
-
getTestOutcomes
-
getError
public net.thucydides.model.domain.stacktrace.FailureCause getError() -
hasRecordedFailures
public boolean hasRecordedFailures() -
dropListeners
public void dropListeners() -
getTestClass
-
getFailedTests
-