2

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{

}

1 Answer 1

0

mvn clean

mvn verify "-Dcucumber.options=--tags @run123"

should do the job while you run this command in the project directory

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.