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

io.cucumber.plugin.event.EventPublisher Maven / Gradle / Ivy

There is a newer version: 7.20.1
Show newest version
package io.cucumber.plugin.event;

import org.apiguardian.api.API;

@API(status = API.Status.STABLE)
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 StepDefinedEvent} - sent for each step definition as it is * loaded, contains the StepDefinition *
  • {@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.attach in a hook triggers this * event. *
  • {@link WriteEvent} - calling scenario.log 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