Package de.qytera.qtaf.cucumber.helper
Class CucumberScenarioHelper
java.lang.Object
de.qytera.qtaf.cucumber.helper.CucumberScenarioHelper
Helper class for extracting information from Cucumber Scenario objects.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetScenarioIdFromTag(io.cucumber.java.Scenario scenario) Find the tag that represents the test ID and extracts the test ID.getTagMetaData(io.cucumber.java.Scenario scenario) Extract key value pairs from cucumber tags i.e.static io.cucumber.core.backend.TestCaseStategetTestCaseState(io.cucumber.java.Scenario scenario) Get the test case state object from a scenario object.
-
Method Details
-
getTestCaseState
public static io.cucumber.core.backend.TestCaseState getTestCaseState(io.cucumber.java.Scenario scenario) Get the test case state object from a scenario object.- Parameters:
scenario- Cucumber scenario object- Returns:
- TestCaseState object
-
getTagMetaData
Extract key value pairs from cucumber tags i.e. a tag @MyKey:MyValue will be added to the resulting kv-pairs as ["MyKey" => "MyValue"].- Parameters:
scenario- Cucumber scenario object- Returns:
- cucumber tag metadata
-
getScenarioIdFromTag
Find the tag that represents the test ID and extracts the test ID.- Parameters:
scenario- Cucumber scenario object- Returns:
- test ID
-