我遇到了一个场景,我需要运行 TestRunner 类 使用黄瓜 Cli,但 TestRunner 无法生成任何报告 你能提出任何想法/方法来实现这一目标吗?
cucumberCli 示例
答案 0 :(得分:0)
在程序参数的末尾添加以下参数 ---plugin html:target/Destination/
如果您正在寻找 Json 报告,您也可以在这里添加 json 插件。
答案 1 :(得分:0)
在跑步课上试试这个。
@CucumberOptions(`features = {"src/test/java/com/mnt/bdd/features/"}`,
`glue` = `{"com/mnt/bdd/stepdef"}`,
`tags` = `{"@Login","@Logout"}`,
//monochrome = false, // display the console output in readable format
//strict = false, // no declaration of any step , strict = false --> pass , true--> fail
//dryRun = false, // checking if mapping is in place
plugin = `{"json:target/cucumber-reports/CucumberTestReport.json"}`
只需根据您的项目编辑标签。