Package io.cucumber.core.runner
Class TestCaseState
java.lang.Object
io.cucumber.core.runner.TestCaseState
- All Implemented Interfaces:
TestCaseState
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidvoidAttach data to the report(s).voidAttach data to the report(s).(package private) void(package private) void(package private) @Nullable ThrowablegetError()getId()Returns the id of the Scenario.Returns the language of the Scenario.getLine()Returns the line in the feature file of the Scenario.getName()Returns the name of the Scenarioprivate UUIDReturn tags of this scenario.Returns the current status of this test case.(package private) UUIDgetUri()Returns the uri of the Scenario.booleanisFailed()Returns true when the scenario has failed.voidOutputs some text into the report.(package private) voidsetCurrentPickleStep(Step currentPickleStep) (package private) voidsetCurrentTestStepId(UUID currentTestStepId)
-
Field Details
-
stepResults
-
bus
-
testCase
-
testExecutionId
-
currentTestStepId
-
currentPickleStep
-
-
Constructor Details
-
TestCaseState
-
-
Method Details
-
add
-
getTestExecutionId
UUID getTestExecutionId() -
getSourceTagNames
Description copied from interface:TestCaseStateReturn tags of this scenario.- Specified by:
getSourceTagNamesin interfaceTestCaseState- Returns:
- tags of this scenario.
-
getStatus
Description copied from interface:TestCaseStateReturns the current status of this test case.The test case status is calculated as the most severe status of the executed steps in the testcase so far.
- Specified by:
getStatusin interfaceTestCaseState- Returns:
- the current status of this test case
-
isFailed
public boolean isFailed()Description copied from interface:TestCaseStateReturns true when the scenario has failed.This is implemented as
this.getStatus() == Status.FAILED.- Specified by:
isFailedin interfaceTestCaseState- Returns:
- true if the scenario has failed.
-
attach
Description copied from interface:TestCaseStateAttach 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.
- Specified by:
attachin interfaceTestCaseState- Parameters:
data- what to attach, for example an image.mediaType- what is the data?name- attachment name
-
attach
Description copied from interface:TestCaseStateAttach data to the report(s).- Specified by:
attachin interfaceTestCaseState- Parameters:
data- what to attach, for example html.mediaType- what is the data?name- attachment name- See Also:
-
log
Description copied from interface:TestCaseStateOutputs some text into the report.- Specified by:
login interfaceTestCaseState- Parameters:
text- what to put in the report.- See Also:
-
getName
Description copied from interface:TestCaseStateReturns the name of the Scenario- Specified by:
getNamein interfaceTestCaseState- Returns:
- the name of the Scenario
-
getId
Description copied from interface:TestCaseStateReturns the id of the Scenario.- Specified by:
getIdin interfaceTestCaseState- Returns:
- the id of the Scenario.
-
getUri
Description copied from interface:TestCaseStateReturns the uri of the Scenario.- Specified by:
getUriin interfaceTestCaseState- Returns:
- the uri of the Scenario.
-
getLanguage
Description copied from interface:TestCaseStateReturns the language of the Scenario.- Specified by:
getLanguagein interfaceTestCaseState- Returns:
- the language of the Scenario.
-
getLine
Description copied from interface:TestCaseStateReturns 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.
- Specified by:
getLinein interfaceTestCaseState- Returns:
- the line in the feature file of the Scenario.
-
geCurrentPickleStep
- Specified by:
geCurrentPickleStepin interfaceTestCaseState
-
getError
@Nullable Throwable getError() -
setCurrentTestStepId
-
clearCurrentTestStepId
void clearCurrentTestStepId() -
setCurrentPickleStep
-
clearCurrentPickleStep
void clearCurrentPickleStep() -
getRequiredCurrentTestStepId
-