Class Result

java.lang.Object
io.cucumber.plugin.event.Result

@API(status=STABLE) public final class Result extends Object
The result of a step, scenario or test run.
  • Constructor Details

    • Result

      public Result(Status status, Duration duration, Throwable error)
      Creates a new result.
      Parameters:
      status - status of the step or scenario
      duration - the duration
      error - the error that caused the failure if any
  • Method Details

    • getStatus

      public Status getStatus()
    • getDuration

      public Duration getDuration()
    • getError

      public Throwable getError()
      Returns the error encountered while executing a step, scenario or test run.

      Will return null when passed. May return null when status is undefined or when skipped due to a failing prior step.

      Returns:
      the error encountered while executing a step or scenario or null.
    • hashCode

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

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

      public String toString()
      Overrides:
      toString in class Object