我正在尝试使用黄瓜预先报告,但收到错误:
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
如何解决此错误?
答案 0 :(得分:0)
错误得到了解决