重试失败的功能文件

问题描述

背景
我们可以使用.feature插件并行运行teymyers Cucumber Parallel个文件。这将为每个.feature文件创建一个Java文件,例如Parallel01IT.java,Parallel02IT.java ... ...

问题:如果运行失败,如何重新运行/重试这些ParallexxIT.java文件?

我没有什么可以尝试的。我在SO中找不到空手道黄瓜,红宝石黄瓜的链接,但在Serenity黄瓜上却找不到。

解决方法

  1. 虽然全新运行通过重新运行插件作为参数"-p","rerun:target/cucumber/rerun.txt"。这会产生黄瓜 重新运行包含失败方案行号的文件。
  2. 然后下一次代替功能目录传递重新运行文本文件 "@target/cucumber-reports/rerun.txt"
  3. 这只会重新运行失败的场景

如果您正在通过junitRunner使用黄瓜选项[我不确定(但是我想这是计划淘汰的)黄瓜,请执行以下操作。

新运行:

@CucumberOptions(features = {"src/test/resources/"},plugin = {"pretty","json:target/cucumber/cucumber.json","rerun:target/cucumber-reports/rerun.txt"})

重新运行:

        @CucumberOptions(
            features = {"@target/cucumber/rerun.txt"},rerun:target/cucumber/rerun.txt"})

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...