运行时选项将黄瓜升级到版本1.2.4时出错

时间:2016-04-15 22:18:04

标签: cucumber cucumber-junit cucumber-java

当我尝试将黄瓜版本从1.1.2升级到1.2.4时,我收到此错误。 我在JDK1.8上运行。

这是不起作用的代码

[Test]
public async Task SimpleTest()
{
    await Task.Delay(10).ContinueWith( async t =>
    {
        await Task.Run(()=>{throw new Exception();});
    });
}

这是错误输出:

RuntimeOptions runtimeOptions = new RuntimeOptions(System.getProperties(), argv);

    Runtime runtime = new Runtime(new MultiLoader(classLoader), classLoader, runtimeOptions);
    try {
        runtime.writeStepdefsJson();
        runtime.run();
    } catch (Exception e) {
        System.out.println("CucumberMain#run: Exception occured - " + e.toString());
        e.printStackTrace();
        if (e.toString().contains("None of the features at")) {
            System.out.println("This should not be an error if feature file does not contains any scenario for"
                    + " execution or marked as ignore through tag " + e.getMessage());
        } else {
            System.out.println("There is some problem in cucumber execution. Error is: " + e.getMessage());
            for (int index = 0; index < argv.length; index++) {
                System.out.println("CucumberMain#run: Exception - argument#" + index + ": " + argv[index]);
            }
            // throw e;
        }
    }

1 个答案:

答案 0 :(得分:0)

黄瓜1.2.4具有以下依赖性。检查已安装的版本以确保它们是最新的。

  • info.cukes»cucumber-core 1.2.4
  • info.cukes»cucumber-jvm-deps 1.0.5
  • info.cukes»gherkin 2.12.2
  • info.cukes»cucumber-junit 1.2.4
  • junit»junit 4.12

可选

  • net.sourceforge.cobertura»cobertura 2.1.1
  • org.mockito»mockito-all 1.10.19