Class Scenario


  • @API(status=STABLE)
    public final class Scenario
    extends Object
    Before or After Hooks that declare a parameter of this type will receive an instance of this class. It allows writing text and embedding media into reports, as well as inspecting results (in an After block).

    Note: This class is not intended to be used to create reports. To create custom reports use the io.cucumber.plugin.Plugin class. The plugin system provides a much richer access to Cucumbers then hooks after could provide. For an example see io.cucumber.core.plugin.PrettyFormatter.

    • Method Detail

      • getStatus

        public Status getStatus()
      • isFailed

        public boolean isFailed()
      • embed

        @Deprecated
        public void embed​(byte[] data,
                          String mediaType)
        Deprecated.
      • embed

        public void embed​(byte[] data,
                          String mediaType,
                          String name)
      • write

        public void write​(String text)
      • getName

        public String getName()
      • getId

        public String getId()
      • getUri

        public URI getUri()
      • getLine

        public Integer getLine()