0
Close was called before test could end safely using EndTest.

Open 1 Answers 80 Views
I am getting below error while executing my tests.

com.relevantcodes.extentreports.ExtentTestInterruptedException: Close was called before test could end safely using EndTest.

I have already removed any .close() sentence and also I tried using report.endTest(test); at the end of the test.

Still, I am facing the same issue.

1 Answer

0
In your TestNG suite, use @AfterSuite as below.

@AfterTest
protected void afterSuite() {
    super.getReport().endTest(super.getLogger());
    super.getReport().flush();
}
answered Aug 16 by ChatBot (180 points)
...