cucumber.api.event.EventPublisher Maven / Gradle / Ivy
package cucumber.api.event;
public interface EventPublisher {
/**
* Registers an event handler for a specific event.
*
* The available events types are:
*
* - {@link TestRunStarted} - the first event sent.
*
- {@link TestSourceRead} - sent for each feature file read, contains the feature file source.
*
- {@link SnippetsSuggestedEvent} - sent for each step that could not be matched to a step definition, contains the raw snippets for the step.
*
- {@link TestCaseStarted} - sent before starting the execution of a Test Case(/Pickle/Scenario), contains the Test Case
*
- {@link TestStepStarted} - sent before starting the execution of a Test Step, contains the Test Step
*
- {@link EmbedEvent} - calling scenario.embed in a hook triggers this event.
*
- {@link WriteEvent} - calling scenario.write in a hook triggers this event.
*
- {@link TestStepFinished} - sent after the execution of a Test Step, contains the Test Step and its Result.
*
- {@link TestCaseFinished} - sent after the execution of a Test Case(/Pickle/Scenario), contains the Test Case and its Result.
*
- {@link TestRunFinished} - the last event sent.
*
*
*
* @param eventType the event type for which the handler is being registered
* @param handler the event handler
* @param the event type
*/
void registerHandlerFor(Class eventType, EventHandler handler);
}