这是我的testrunner类。在使用restapi测试运行此测试时,我得到错误java.lang.arithmetricexception:/by零。运行任何基于web的测试时都不会发现此问题。 Package 选择;
导入org.junit.runner.runwith;
进口io.cumber.junit.cumber;导入io.cumber.junit.cucumberoptions;
@runwith(cumber.class)@cucumberoptions(features=“src/test/java/features”,plugin={“pretty”,“json:target/cumber reports/cumber.json”,“html:target/cumber/report.html”,“junit:target/cumber reports/cumber report.xml”,“com.aventstack.extentstreports.extentcumberAdapter:”,“timeline:test output thread/”,glue={“StepDefinitions”},tags=“@backend”,单色=true,dryrun=false)
公共类testrunner{}
错误:信息:找不到pdf报告配置。使用默认设置。7月9日,2021年12:31:58 pm tech.grasshopper.pdf.extend.extendpdfccuumberreporter flush severy:tech.grasshopper.pdf.util.numberrutil.dividetopercent(numberrutil.java:11)tech.grasshopper.pdf.chapter.summary.summarydialcharts.createscenariosdialchart(summarydialcharts.java:38)处发生异常tech.grasshopper.pdf.chapter.summary.summarydialcharts.display(summarydialcharts.java:25)在tech.grasshopper.pdf.chapter.summary.summarydialcharts.createdialcharts(summarypage.java:74)在tech.grasshopper.pdf.chapter.summary.summarypage.createpage(summarypage.java:39)在tech.grasshopper.pdf.chapter.summary.summarychapter.createchapter(summarychapter.java:15)在tech.grasshopper.pdf.pdfcucumberreport.lambda$0(pdfcucumberreport.java:100)在java.util.arraylist.foreach(未知源代码)在tech.grasshopper.pdf.pdfcucumberreport.createreport(pdfcucumberreport.java:100)在tech.grasshopper.pdf.extent.extentpdfccumberReporter.flush(extentpdfccumberReporter.java:66)在tech.grasshopper.pdf.extent.extentpdfccumberReporter.access$1(extentpdfccumberReporter.java:57)在tech.grasshopper.pdf.extent.extentpdfccumberReporter$1.onnext(extentpdfccumberReporter.java:42)在tech.grasshopper.pdf.extent.extendpdfccumberReporter$1.onnext(extendpdfccumberReporter.java:1)在io.reactivex.rxjava3.subjects.publishsubject$publishdisposable.onnext(publishsubject.java:310)在io.reactivex.rxjava3.subjects.publishsubject.onnext(publishsubject.java:226)在com.aventstack.extentreports.reactivesubject.onflush(reactivesubject.java:83)在com.aventstack.extentreports.abstractprocessor.onflush(abstractprocessor.java:85)在com.aventstack.extentreports.extentreports.flush(extentreports.java:284)在com.aventstack.extentreports.cumber.adapter.extentcumberAdapter.finishreport(extentcumberAdapter.java:296)在com.aventstack.extentreports.cumber.adapter.extentcumberAdapter.access$6(extentcumberAdapter.java:295)在com.aventstack.extentcumber.adapter.extentcumberAdapter$8.receive(extentcumberAdapter.java:132)在com.aventstack.extentreports.cucumber.adapter.extentcumberAdapter$8.receive(extentcumberAdapter.java:1)在io.cumber.core.eventbus.abstracteventpublisher.send(abstracteventpublisher.java:51)在io.cumber.core.eventbus.abstracteventbus.send(abstracteventbus.java:12)在io.Cumber.core.runtime.CumberExecutionContext.emittestrunfinished(cucumberexecutioncontext.java:93)在io.Cumber.core.runtime.CumberExecutionContext.finishtestrun(cucumberexecutioncontext.java:74)在io.Cumber.junit.Cumber$Runcumber.evaluate(Cumber.java:236)在org.junit.Runner.Runner.parentrunner.parentrunner.java:363org.eclipse.jdt.internal.junit4.runner.junit4testreference.run(junit4testreference.java:89)在org.eclipse.jdt.internal.junit.runner.testexecution.run(testexecution.java:41)在org.eclipse.jdt.internal.junit.runner.remotetestrunner.runner(remotetestrunner.java:542)在org.eclipse.jdt.internal.junit.runner.remotetestrunner.runtests(remotetestrunner.java:770)在org.eclipse.jdt.internal.junit.runner.remotetestrunner.run(remotetestrunner.java:464)在org.eclipse.jdt.internal.junit.runner.remotetestrunner.main(remotetestrunner.java:210)上
暂无答案!
目前还没有任何答案,快来回答吧!