Package io.cucumber.core.backend
Interface TestCaseState
-
@API(status=STABLE) public interface TestCaseState
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default voidattach(byte[] data, String mediaType, String name)Attach data to the report(s).default voidattach(String data, String mediaType, String name)voidembed(byte[] data, String mediaType)Deprecated.useattach(byte[], String, String)instead.voidembed(byte[] data, String mediaType, String name)Deprecated.StringgetId()IntegergetLine()StringgetName()Collection<String>getSourceTagNames()StatusgetStatus()Returns the current status of this test case.URIgetUri()booleanisFailed()default voidlog(String text)Outputs some text into the report.voidwrite(String text)Deprecated.uselog(String)
-
-
-
Method Detail
-
getSourceTagNames
Collection<String> getSourceTagNames()
- Returns:
- source_tag_names.
-
getStatus
Status getStatus()
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
-
isFailed
boolean isFailed()
- Returns:
- true if and only if
getStatus()returns "failed"
-
embed
@Deprecated void embed(byte[] data, String mediaType)
Deprecated.useattach(byte[], String, String)instead.- Parameters:
data- what to embed, for example an image.mediaType- what is the data? Using the- See Also:
attach(byte[], String, String)
-
embed
@Deprecated void embed(byte[] data, String mediaType, String name)
Deprecated.Embeds data into the report(s).// Embed a screenshot. See your UI automation tool's docs for // details about how to take a screenshot. scenario.embed(pngBytes, "image/png", "Bartholomew and the Bytes of the Oobleck");To ensure reporting tools can understand what the data is a
mediaTypemust 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.
- Parameters:
data- what to embed, for example an image.mediaType- what is the data?name- embedding name
-
attach
default void attach(byte[] data, String mediaType, String name)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
mediaTypemust 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.
- Parameters:
data- what to attach, for example an image.mediaType- what is the data?name- attachment name
-
attach
default void attach(String data, String mediaType, String name)
- Parameters:
data- what to attach, for example html.mediaType- what is the data?name- attachment name- See Also:
attach(byte[], String, String)
-
write
@Deprecated void write(String text)
Deprecated.uselog(String)Outputs some text into the report.- Parameters:
text- what to put in the report.
-
log
default void log(String text)
Outputs some text into the report.- Parameters:
text- what to put in the report.
-
getName
String getName()
- Returns:
- the name of the Scenario
-
getId
String getId()
- Returns:
- the id of the Scenario.
-
getUri
URI getUri()
- Returns:
- the uri of the Scenario.
-
getLine
Integer getLine()
- 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.
-
-