Class JUnitExecutionListener
- java.lang.Object
-
- de.bmiag.tapir.execution.executor.AbstractExecutionListener
-
- de.bmiag.tapir.junitexecution.listener.JUnitExecutionListener
-
- All Implemented Interfaces:
ExecutionListener
@Component("tapirJUnitExecutionListener") @Order(-7000) public class JUnitExecutionListener extends AbstractExecutionListener
TheJUnitExecutionListener
notifies theEachTestNotifier
which is provided byEachTestNotifierProvider
about step executions. Using this listener it's possible to fulfill JUnit's reporting API. Tools like Eclipse, Maven Surefire or Jenkins provide customRunListener
which are (indirectly) notified by this listener.- Since:
- 2.0.0
- Author:
- Oliver Libutzki <[email protected]>
-
-
Constructor Summary
Constructors Constructor Description JUnitExecutionListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
classSkipped(TestClass it)
Called when a test class has been skipped.void
stepFailed(TestStep it, java.lang.Throwable throwable)
Called when a test step has been finished with an exception.void
stepSkipped(TestStep it)
Called when a test step has been skipped.void
stepStarted(TestStep it)
Called when a test step has been started.void
stepSucceeded(TestStep it)
Called when a test step has been finished successfullyvoid
suiteSkipped(TestSuite it)
Called when a test suite has been skipped.-
Methods inherited from class de.bmiag.tapir.execution.executor.AbstractExecutionListener
classFailed, classStarted, classSucceeded, executionFailed, executionStarted, executionSucceeded, suiteFailed, suiteStarted, suiteSucceeded
-
-
-
-
Method Detail
-
suiteSkipped
public void suiteSkipped(TestSuite it)
Description copied from interface:ExecutionListener
Called when a test suite has been skipped. For a skipped test suiteExecutionListener.suiteStarted(TestSuite)
has never been called.- Specified by:
suiteSkipped
in interfaceExecutionListener
- Overrides:
suiteSkipped
in classAbstractExecutionListener
- Parameters:
it
- the test suite which has been skipped
-
classSkipped
public void classSkipped(TestClass it)
Description copied from interface:ExecutionListener
Called when a test class has been skipped. For a skipped test classExecutionListener.classStarted(TestClass)
has never been called.- Specified by:
classSkipped
in interfaceExecutionListener
- Overrides:
classSkipped
in classAbstractExecutionListener
- Parameters:
it
- the test class which has been skipped
-
stepStarted
public void stepStarted(TestStep it)
Description copied from interface:ExecutionListener
Called when a test step has been started. After this method has been calledExecutionListener.stepSucceeded(TestStep)
orExecutionListener.stepFailed(TestStep, Throwable)
will be called after processing the test step.- Specified by:
stepStarted
in interfaceExecutionListener
- Overrides:
stepStarted
in classAbstractExecutionListener
- Parameters:
it
- the test step which has been started
-
stepSucceeded
public void stepSucceeded(TestStep it)
Description copied from interface:ExecutionListener
Called when a test step has been finished successfully- Specified by:
stepSucceeded
in interfaceExecutionListener
- Overrides:
stepSucceeded
in classAbstractExecutionListener
- Parameters:
it
- the test step which has been finished successfully
-
stepFailed
public void stepFailed(TestStep it, java.lang.Throwable throwable)
Description copied from interface:ExecutionListener
Called when a test step has been finished with an exception.- Specified by:
stepFailed
in interfaceExecutionListener
- Overrides:
stepFailed
in classAbstractExecutionListener
- Parameters:
it
- the test step which has been finished with an exceptionthrowable
- The occurred exception
-
stepSkipped
public void stepSkipped(TestStep it)
Description copied from interface:ExecutionListener
Called when a test step has been skipped. For a skipped test stepExecutionListener.stepStarted(TestStep)
has never been called.- Specified by:
stepSkipped
in interfaceExecutionListener
- Overrides:
stepSkipped
in classAbstractExecutionListener
- Parameters:
it
- the test step which has been skipped
-
-