All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cucumber.api.event.EventPublisher Maven / Gradle / Ivy

There is a newer version: 7.17.0
Show newest version
package cucumber.api.event;

public interface EventPublisher {

    /**
     * Registers an event handler for a specific event.
     * 

* The available events types are: *

    *
  • {@link Event} - all events. *
  • {@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 * @see Event */ void registerHandlerFor(Class eventType, EventHandler handler); /** * Unregister an event handler for a specific event * * @param eventType the event type for which the handler is being registered * @param handler the event handler * @param the event type */ void removeHandlerFor(Class eventType, EventHandler handler); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy