Package de.bmiag.tapir.allure.listener
Class AllureExecutionListener
- java.lang.Object
-
- de.bmiag.tapir.allure.listener.AllureExecutionListener
-
- All Implemented Interfaces:
AttachmentListener
,ExecutionListener
@Component("tapirAllureExecutionListener") @Order(7000) public class AllureExecutionListener extends java.lang.Object implements ExecutionListener, AttachmentListener
This listener converts the tapir execution model into the Allure model and delegates all execution events to the Allure lifecycle component. It handles also incoming attachments and makes sure that they are available in the Allure report.- Since:
- 2.0.0
- Author:
- Oliver Libutzki <[email protected]>
-
-
Constructor Summary
Constructors Constructor Description AllureExecutionListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
attachmentAdded(TestStep testStep, Attachment attachment)
Called whenever an attachment is added.void
classFailed(TestClass testClass, java.lang.Throwable throwable)
Called when a test class has been finished with an exception.void
classSkipped(TestClass testClass)
Called when a test class has been skipped.void
classStarted(TestClass testClass)
Called when a test class has been started.void
classSucceeded(TestClass testClass)
Called when a test class has been finished successfullyvoid
executionFailed(ExecutionPlan it, java.lang.Throwable throwable)
Called when an execution plan has been finished with an exception.void
executionStarted(ExecutionPlan it)
Called when an execution plan has been started.void
executionSucceeded(ExecutionPlan it)
Called when an execution plan has been finished successfullyvoid
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
suiteFailed(TestSuite it, java.lang.Throwable throwable)
Called when a test suite has been finished with an exception.void
suiteSkipped(TestSuite it)
Called when a test suite has been skipped.void
suiteStarted(TestSuite it)
Called when a test suite has been started.void
suiteSucceeded(TestSuite it)
Called when a test suite has been finished successfully
-
-
-
Method Detail
-
executionStarted
public void executionStarted(ExecutionPlan it)
Description copied from interface:ExecutionListener
Called when an execution plan has been started. After this method has been calledExecutionListener.executionSucceeded(ExecutionPlan)
orExecutionListener.executionFailed(ExecutionPlan, Throwable)
will be called after processing the execution plan.- Specified by:
executionStarted
in interfaceExecutionListener
- Parameters:
it
- the execution plan which has been started- Since:
- 2.0.0
-
executionSucceeded
public void executionSucceeded(ExecutionPlan it)
Description copied from interface:ExecutionListener
Called when an execution plan has been finished successfully- Specified by:
executionSucceeded
in interfaceExecutionListener
- Parameters:
it
- the execution plan which has been finished successfully- Since:
- 2.0.0
-
executionFailed
public void executionFailed(ExecutionPlan it, java.lang.Throwable throwable)
Description copied from interface:ExecutionListener
Called when an execution plan has been finished with an exception.- Specified by:
executionFailed
in interfaceExecutionListener
- Parameters:
it
- the execution plan which has been finished with an exceptionthrowable
- The occurred exception- Since:
- 2.0.0
-
suiteStarted
public void suiteStarted(TestSuite it)
Description copied from interface:ExecutionListener
Called when a test suite has been started. After this method has been calledExecutionListener.suiteSucceeded(TestSuite)
orExecutionListener.suiteFailed(TestSuite, Throwable)
will be called after processing the test suite.- Specified by:
suiteStarted
in interfaceExecutionListener
- Parameters:
it
- the test suite which has been started- Since:
- 2.0.0
-
suiteSucceeded
public void suiteSucceeded(TestSuite it)
Description copied from interface:ExecutionListener
Called when a test suite has been finished successfully- Specified by:
suiteSucceeded
in interfaceExecutionListener
- Parameters:
it
- the test suite which has been finished successfully- Since:
- 2.0.0
-
suiteFailed
public void suiteFailed(TestSuite it, java.lang.Throwable throwable)
Description copied from interface:ExecutionListener
Called when a test suite has been finished with an exception.- Specified by:
suiteFailed
in interfaceExecutionListener
- Parameters:
it
- the test suite which has been finished with an exceptionthrowable
- The occurred exception- Since:
- 2.0.0
-
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
- Parameters:
it
- the test suite which has been skipped- Since:
- 2.0.0
-
classStarted
public void classStarted(TestClass testClass)
Description copied from interface:ExecutionListener
Called when a test class has been started. After this method has been calledExecutionListener.classSucceeded(TestClass)
orExecutionListener.classFailed(TestClass, Throwable)
will be called after processing the test class.- Specified by:
classStarted
in interfaceExecutionListener
- Parameters:
testClass
- the test class which has been started- Since:
- 2.0.0
-
classSucceeded
public void classSucceeded(TestClass testClass)
Description copied from interface:ExecutionListener
Called when a test class has been finished successfully- Specified by:
classSucceeded
in interfaceExecutionListener
- Parameters:
testClass
- the test class which has been finished successfully- Since:
- 2.0.0
-
classFailed
public void classFailed(TestClass testClass, java.lang.Throwable throwable)
Description copied from interface:ExecutionListener
Called when a test class has been finished with an exception.- Specified by:
classFailed
in interfaceExecutionListener
- Parameters:
testClass
- the test class which has been finished with an exceptionthrowable
- The occurred exception- Since:
- 2.0.0
-
classSkipped
public void classSkipped(TestClass testClass)
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
- Parameters:
testClass
- the test class which has been skipped- Since:
- 2.0.0
-
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
- Parameters:
it
- the test step which has been started- Since:
- 2.0.0
-
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
- Parameters:
it
- the test step which has been finished successfully- Since:
- 2.0.0
-
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
- Parameters:
it
- the test step which has been finished with an exceptionthrowable
- The occurred exception- Since:
- 2.0.0
-
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
- Parameters:
it
- the test step which has been skipped- Since:
- 2.0.0
-
attachmentAdded
public void attachmentAdded(TestStep testStep, Attachment attachment)
Description copied from interface:AttachmentListener
Called whenever an attachment is added.- Specified by:
attachmentAdded
in interfaceAttachmentListener
- Parameters:
testStep
- the current test stepattachment
- The attachment which has been added- Since:
- 2.0.0
-
-