Class TestStep

java.lang.Object
io.cucumber.messages.types.TestStep

public final class TestStep extends Object
Represents the TestStep message in Cucumber's message protocol

A `TestStep` is derived from either a `PickleStep` combined with a `StepDefinition`, or from a `Hook`.

When derived from a PickleStep: * For `UNDEFINED` steps `stepDefinitionIds` and `stepMatchArgumentsLists` will be empty. * For `AMBIGUOUS` steps, there will be multiple entries in `stepDefinitionIds` and `stepMatchArgumentsLists`. The first entry in the stepMatchArgumentsLists holds the list of arguments for the first matching step definition, the second entry for the second, etc

  • Constructor Details

  • Method Details

    • getHookId

      public Optional<String> getHookId()
      Pointer to the `Hook` (if derived from a Hook)
    • getId

      public String getId()
    • getPickleStepId

      public Optional<String> getPickleStepId()
      Pointer to the `PickleStep` (if derived from a `PickleStep`)
    • getStepDefinitionIds

      public Optional<List<String>> getStepDefinitionIds()
      Pointer to all the matching `StepDefinition`s (if derived from a `PickleStep`).

      Each element represents a matching step definition.

    • getStepMatchArgumentsLists

      public Optional<List<StepMatchArgumentsList>> getStepMatchArgumentsLists()
      A list of list of StepMatchArgument (if derived from a `PickleStep`).

      Each element represents the arguments for a matching step definition.

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object