Package de.qytera.qtaf.cucumber.helper
Class CucumberTagHelper
java.lang.Object
de.qytera.qtaf.cucumber.helper.CucumberTagHelper
Class that provides helper methods for extracting information from cucumber tags.
-
Method Summary
Modifier and TypeMethodDescriptionstatic MatcherExtract hey and value from a string.getKeyValueListPairs(List<String> tags) Get a key-value-list pairs from a list of cucumber tag strings.getKeyValuePairs(List<String> tags) Get a list of key-value pairs from a list of cucumber tag strings.getKeyValuePairsFromTagList(List<io.cucumber.messages.types.Tag> tags) Get a list of key-value pairs from a list of cucumber tag objects.static StringFind the tag that represents the test ID and extracts the test ID.static booleanCheck if a given string is a key-value-pair (matches keyValueRegex).static booleanCheck if a given string is a tag.
-
Method Details
-
isKeyValuePair
Check if a given string is a key-value-pair (matches keyValueRegex).- Parameters:
s- string- Returns:
- true if string is a key-value-pair, false otherwise
-
isTag
Check if a given string is a tag.- Parameters:
s- string- Returns:
- true if string is a tag
-
getKeyAndValueMatch
Extract hey and value from a string.- Parameters:
s- string- Returns:
- Matcher object
-
getKeyValuePairsFromTagList
public static Map<String,String> getKeyValuePairsFromTagList(List<io.cucumber.messages.types.Tag> tags) Get a list of key-value pairs from a list of cucumber tag objects.- Parameters:
tags- List of cucumber tag objects- Returns:
- Map of key-value-pairs
-
getKeyValuePairs
Get a list of key-value pairs from a list of cucumber tag strings.- Parameters:
tags- List of cucumber tag strings- Returns:
- Map of key-value-pairs
-
getKeyValueListPairs
Get a key-value-list pairs from a list of cucumber tag strings.- Parameters:
tags- List of cucumber tag strings- Returns:
- Map of key-value-lists
-
getTestId
Find the tag that represents the test ID and extracts the test ID.- Parameters:
tags- List of cucumber tags- Returns:
- test ID
-