问题
I'm looking to have reports output from my Cucumber tests. So far I can put the following:
cucumber features/feature_name.feature -f json -o C:/Reports
This will only produce a json report at the end of the test and you can't see the results as they're happening as you normally would with cucumber.
Can I get it to do both so that I will see the green/red steps within cmd and get the json report at the end?
Thank you
回答1:
You can add as many report formatters as you want.
To include the default "pretty" formatter and the "json" formatter:
cucumber features/feature_name.feature -f pretty -f json -o C:/Reports/results.txt
回答2:
It's now recommended to use -p json:C:/Reports/results.json.
来源:https://stackoverflow.com/questions/25781478/test-report-output-using-cucumber-selenium-ruby