java 如何解决@CucumberOptions 中格式选项的弃用问题?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31138086/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to resolve the deprecation of format option in @CucumberOptions?
提问by Akshay jain
When i am using the option formatin @CucumberOptions
for test reports it is showing that the format option has been deprecated how to resolve that.
当我在测试报告中使用选项格式时@CucumberOptions
,它显示格式选项已被弃用如何解决该问题。
@CucumberOptions( monochrome = true, format = {"html:target/cucumber-html-report", "json:target/cucumber-json-report.json" })
回答by Paizo
replace formatwith plugin
用插件替换格式
@CucumberOptions( monochrome = true,plugin = {"html:target/cucumber-html-report", "json:target/cucumber-json-report.json" })
@CucumberOptions( monochrome = true,plugin = {"html:target/cucumber-html-report", "json:target/cucumber-json-report.json" })