每次我都会使用testng运行脚本,我收到了主题中提到的错误。尝试了不同版本的病毒范围报告,但仍然得到相同的错误。
com.relevantcodes.extentreports.ExtentTestInterruptedException: Close was called before test could end safely using EndTest.
at com.relevantcodes.extentreports.Report.terminate(Report.java:416)
at com.relevantcodes.extentreports.ExtentReports.close(ExtentReports.java:708)
at Test.tes.MyHomepageTestCases.HomeTestCases.tc_Logout(HomeTestCases.java:119)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
答案 0 :(得分:0)
要解决此问题,您必须添加
reporter.endTest(testReporter);
到测试结束。