I am getting below ExtentTestInterruptedException
exception when I am running my test in multiple threads(Using TestNG to launch test in multiple threads):
com.relevantcodes.extentreports.ExtentTestInterruptedException:
Close was called before test could end safely using EndTest.
at com.relevantcodes.extentreports.Report.terminate(Report.java:425)
at com.relevantcodes.extentreports.ExtentReports.close(ExtentReports.java:917)
Steps Followed
- I am starting my test in
@BeforeTest
method with extent reportstartTest
method - And ending my test with extent report
endTest
in@AfterMethod
method - My extent report close method is defined in
@AfterSuite
function. - I removed
close()
method call from@AfterSuite
but in that case result for few of the test cases appears as unknown.
Can someone please help me in resolving this query?