Package io.cucumber.java8
Class Scenario
- java.lang.Object
-
- io.cucumber.java8.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 seeio.cucumber.core.plugin.PrettyFormatter
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
embed(byte[] data, String mediaType)
Deprecated.void
embed(byte[] data, String mediaType, String name)
String
getId()
Integer
getLine()
String
getName()
Collection<String>
getSourceTagNames()
Status
getStatus()
Returns the current status of this scenario.URI
getUri()
boolean
isFailed()
void
write(String text)
-
-
-
Method Detail
-
getSourceTagNames
public Collection<String> getSourceTagNames()
-
getStatus
public Status getStatus()
Returns the current status of this scenario.The scenario status is calculate as the most severe status of the executed steps in the scenario so far.
- Returns:
- the current status of this scenario
-
isFailed
public boolean isFailed()
-
embed
@Deprecated public void embed(byte[] data, String mediaType)
Deprecated.
-
write
public void write(String text)
-
getName
public String getName()
-
getId
public String getId()
-
getUri
public URI getUri()
-
getLine
public Integer getLine()
-
-