获取错误:生成Cucumber使用情况报告时出错

时间:2017-09-10 14:40:42

标签: java cucumber cucumber-jvm

我正在尝试使用黄瓜预先报告,但收到错误:

function birthdayCakeCandles(n, ar) {
    // Complete this function
    ar.sort();
    var biggestNo = ar[(ar.length - 1)];
    var total = 0;
    for (var i = 0; i < ar.length; i++) {
        if (ar[i] === biggestNo)
            total++;
    }
    return total;
}

我使用的代码是:

Exception in thread "main" org.apache.maven.reporting.MavenReportException: Error occured while generating Cucumber usage report
    at com.github.mkolisnyk.cucumber.reporting.CucumberUsageReporting.executeReport(CucumberUsageReporting.java:385)
    at support.testhi.main(testhi.java:36)
Caused by: java.lang.NullPointerException
    at com.github.mkolisnyk.cucumber.reporting.types.usage.CucumberStepSource.<init>(CucumberStepSource.java:35)
    at com.github.mkolisnyk.cucumber.reporting.CucumberUsageReporting.getStepSources(CucumberUsageReporting.java:345)
    at com.github.mkolisnyk.cucumber.reporting.CucumberUsageReporting.executeReport(CucumberUsageReporting.java:366)
    ... 1 more

如何解决此错误?

1 个答案:

答案 0 :(得分:0)

更新了pom.xml中黄瓜报告库的版本后,

错误得到了解决