Tam Vo
Tam Vo

Reputation: 331

How to set multiple plugins for Cucumber Options from terminal of cucumber?

I set Cucumber options into my cucumber project below: enter image description here

And I run test by mvn command line with -Dcucumber.options to override options of my prject:

mvn -f "pom.xml" -Dcucumber.options="--plugin json:report/cucumber.json,junit:target/junitreports.xml --tags @Login" test

But is show error:

Data provider mismatch
Method: runScenario([Parameter{index=0, type=cucumber.api.testng.PickleEventWrapper, declaredAnnotations=[]}, Parameter{index=1, type=cucumber.api.testng.CucumberFeatureWrapper, declaredAnnotations=[]}])
Arguments: [(cucumber.api.testng.CucumberExceptionWrapper)cucumber.api.testng.CucumberExceptionWrapper@a0bf272]

Upvotes: 4

Views: 7951

Answers (2)

Abhishek Dixit
Abhishek Dixit

Reputation: 11

Try this ..

@CucumberOptions(features= {"src/test/resources/features"}, glue= {"com"},
    plugin = {"pretty", "junit:target/JUNITReports/report.xml", "html:target/HTMLReports", "json:target/JSONReports/report.json"})

Upvotes: 1

Grasshopper
Grasshopper

Reputation: 9058

Need to repeat the plugin option. Try this

--plugin json:report/cucumber.json --plugin junit:target/junitreports.xml

Upvotes: 9

Related Questions