简体   繁体   English

范围报告:com.relevantcodes.extentreports.ExtentTestInterruptedException:在使用EndTest可以安全结束测试之前,调用了close

[英]Extent report :com.relevantcodes.extentreports.ExtentTestInterruptedException: Close was called before test could end safely using EndTest

Everytime i would run script using testng , i'm getting the error mentioned as in subject . 每次我使用testng运行脚本时,都会遇到主题中提到的错误。 Tried different version of jar of Extent report but still get the same error. 尝试了“ Extent”报告的jar版本不同,但仍然收到相同的错误。

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)

To solve this problem, you have to add 要解决此问题,您必须添加

reporter.endTest(testReporter);

to the end of your test. 到测试结束。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用EndTest可以安全结束测试之前,调用了扩展报告引发Close - Extent report is throwing Close was called before test could end safely using EndTest 范围报告report.endTest(test)方法? - Extent report report.endTest(test) method? Jenkins 中用于范围报告 com.aventstack.extentreports.model.Test 的不需要的日志 - Unwanted Logs in Jenkins for extent reports com.aventstack.extentreports.model.Test 如何使用 spark (ExtentReports 5) 生成范围报告? - How to generate extent reports using spark (ExtentReports 5)? Extent Reports 的 com.aventstack 和 com.relevantcodes 依赖有什么区别 - What is the difference between com.aventstack and com.relevantcodes dependencies of Extent Reports 如何在testng扩展区报告版本2.41.2(相关代码)中添加数据提供者值 - How to add data provider values in testng extent-report version 2.41.2(relevantcodes) 如何在范围报告中捕获所有测试用例? - How to capture all test cases in extent report? 范围报告测试状态记录失败 - Extent report test status recording for failure 如何在范围报告中明确地使测试步骤失败? - How to explicitly fail a test step in Extent Report? 尝试使用TestNG中的ExtentReports生成测试报告时获取NullPointerException - Getting NullPointerException when trying to generate test reports using ExtentReports in TestNG
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM