Class

io.cucumber.scala

Scenario

Related Doc: package scala

Permalink

class Scenario extends AnyRef

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.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Scenario
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Scenario(delegate: TestCaseState)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def attach(data: String, mediaType: String, name: String): Unit

    Permalink

    Attaches some text based data to the report.

    Attaches some text based data to the report.

    data

    what to attach, for example html.

    mediaType

    what is the data?

    name

    attachment name

    See also

    #attach(byte[], String, String)

  6. def attach(data: Array[Byte], mediaType: String, name: String): Unit

    Permalink

    Attach data to the report(s).

    Attach data to the report(s).

    
    // Attach a screenshot. See your UI automation tool's docs for
    // details about how to take a screenshot.
    scenario.attach(pngBytes, "image/png", "Bartholomew and the Bytes of the Oobleck");
    
    

    To ensure reporting tools can understand what the data is a mediaType must be provided. For example: text/plain, image/png, text/html;charset=utf-8.

    Media types are defined in RFC 7231 Section 3.1.1.1.

    data

    what to attach, for example an image.

    mediaType

    what is the data?

    name

    attachment name

  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. val delegate: TestCaseState

    Permalink
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def getId: String

    Permalink

    returns

    the id of the Scenario.

  14. def getLine: Integer

    Permalink

    returns

    the line in the feature file of the Scenario. If this is a Scenario from Scenario Outlines this will return the line of the example row in the Scenario Outline.

  15. def getName: String

    Permalink

    returns

    the name of the Scenario

  16. def getSourceTagNames: Collection[String]

    Permalink

    returns

    tags of this scenario.

  17. def getStatus: Status

    Permalink

    Returns the current status of this test case.

    Returns the current status of this test case.

    The test case status is calculate as the most severe status of the executed steps in the testcase so far.

    returns

    the current status of this test case

  18. def getUri: URI

    Permalink

    returns

    the uri of the Scenario.

  19. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  20. def isFailed: Boolean

    Permalink

    returns

    true if and only if getStatus returns "failed"

  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. def log(text: String): Unit

    Permalink

    Outputs some text into the report.

    Outputs some text into the report.

    text

    what to put in the report.

  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  28. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped