How can I get cucumber tags as a System Property in my Step definition class

So here is what I am trying to do from my Step Definition Class

 If(cucumberOptionsTags == "E2E")  { dataUtil = bla } else { dataUtil = bla } 
My question is how can I get cucumberOptionsTags.  What are the different options. I am passing the Cucumber Options as below :

@RunWith(Cucumber)

@CucumberOptions(

strict=true,

features=[“features”],

tags=[“@envStage”], //@env_preProd

plugin=[“html:target/cucumber-html-report”],

glue=[“src/test/cucumber/steps”, “src/test/cucumber/support”])

class GroovyTestClass {

}

Default Asked on January 19, 2019 in Program QA Automation.
Add Comment
  • 0 Answer(s)
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.