使用 Cucumber 的测试报告输出 - Selenium Ruby [英] Test Report Output using Cucumber - Selenium Ruby
本文介绍了使用 Cucumber 的测试报告输出 - Selenium Ruby的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望从我的 Cucumber 测试中获得报告输出.到目前为止,我可以输入以下内容:
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
这只会在测试结束时生成一个 json 报告,并且您无法看到结果,因为它们发生在黄瓜上.
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.
我是否可以同时执行这两项操作,以便在 cmd 中看到绿色/红色步骤并在最后获取 json 报告?
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?
谢谢
推荐答案
您可以添加任意数量的报表格式化程序.
You can add as many report formatters as you want.
要包含默认的pretty"格式化程序和json"格式化程序:
To include the default "pretty" formatter and the "json" formatter:
cucumber features/feature_name.feature -f pretty -f json -o C:/Reports/results.txt
这篇关于使用 Cucumber 的测试报告输出 - Selenium Ruby的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文