Join 500+ Software Testing professionals. Solve problem and get your problem solved. Register Now!

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

Open 1 Answers 638 Views
0 1
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
0
In your TestNG suite, use @AfterSuite as below.

@AfterTest
protected void afterSuite() {
    super.getReport().endTest(super.getLogger());
    super.getReport().flush();
}
answered by (202 points)

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
...