New2API
8 years agoFrequent Contributor
How to get Testcase Tag in a groovy script
Hi, I would like to get the tag name of a testcase in a groovy step.
intent:
def TagName = Get Current test's Tag
if(TagName == "Positive"){
Do this
}else{
do this
}
I used below scripts...
def ProjectTags = testRunner.testCase.testSuite.project.getTags()
log.info ProjectTags
def TC = testRunner.testCase.getTagIds()
log.info TC
Can you please provide some info one this?
TIA.