Package io.cucumber.plugin
Interface ConcurrentEventListener
-
- All Superinterfaces:
Plugin
@API(status=STABLE) public interface ConcurrentEventListener extends Plugin
Listens to pickle execution events. Can be used to implement reporters.When cucumber executes test in parallel or in a framework that supports parallel execution (e.g. JUnit or TestNG)
TestCase
events from different pickles may interleave.This interface marks an
EventListener
as capable of understanding interleaved pickle events.While running tests in parallel cucumber makes the following guarantees:
- The event publisher is synchronized. Events are not published concurrently.
- For test cases executed on different threads a callback registered on the
event publisher will be called by different threads. I.e.
Thread.currentThread()
will return a different thread for two test cases executed on a different thread (but not necessarily the executing thread).
- See Also:
Event
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
setEventPublisher(EventPublisher publisher)
Set the event publisher.
-
-
-
Method Detail
-
setEventPublisher
void setEventPublisher(EventPublisher publisher)
Set the event publisher. The plugin can register event listeners with the publisher.- Parameters:
publisher
- the event publisher
-
-