0

Everytime i would run script using testng , i'm getting the error mentioned as in subject . Tried different version of jar of Extent report but still get the same error.

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)
Shashank Bisht
  • 19
  • 1
  • 10

1 Answers1

0

To solve this problem, you have to add

reporter.endTest(testReporter);

to the end of your test.

Ivar
  • 6,138
  • 12
  • 49
  • 61