TestNg emailable-report is not updating?

Viewed 4086

When I am running the tesng.xml file by running it by right clicking on it ,the emailable-report.html file is showing as per the latest test result ,but While running it from terminal by "mvn test" test results are coming as per expected but emailable-report.html file is updated as per the current result .maven results emailable-report

2 Answers

I had the same problem, but the folder was ok. The problem is that the emailable-report.html generation occurs after all the execution, including the annotations @After.... What I did is using Reporter.getCurrentTestResult(); in @AfterTest before performing the email send action to have the file updated at the right time.

Related