Reputation: 91
I am trying to set the cucumber tags from maven command(through command line maven command). I am using Junit runner and cucumber options to specify the run and specify cucumber options(format,features,...).For before the maven invokes my Junit runner,how can I set the tags to the cucumber options.
Snippets:
Junit Runner
@RunWith(Cucumber.class) @CucumberOptions ( features={"src/test/resources/Features"},glue = "com.xxxxx.stepDefinition", // tags = {"@run123"}, format={ "pretty","html:target/site/cucumber-pretty","json:target/cucumber.json"} )
public class RunTest{
}
Upvotes: 2
Views: 1712
Reputation: 16
mvn clean
mvn verify "-Dcucumber.options=--tags @run123"
should do the job while you run this command in the project directory
Upvotes: 0