I am trying to generate the expected HTML report with ReportNG. I have included the necessary jar files (guice, velocity, and reportng) and written a Test class and various Page Object classes. I added the necessary listeners into the testing.xml file. I have coded in Java and used Selenium and TestNG. My tests all run successfully.
My only problem is that the report is not updating. I ran it once with only one test to make sure it works. The report was generated successfully and shows one method was passed. I added 4 other tests and the HTML report still shows only one method. I tried deleting the old HTML report and no new one has generated.
Here is a screenshot of my project
Thanks in advance!
Even i tried using ReportNG, but as per my knowledge, ReportNG is no more used, instead I would suggest, use customized TestNG report format.
Here are few links, which may be helpful for you,
https://www.seleniumeasy.com/testng-tutorials/testng-customize-emailable-html-report-example
https://github.com/cbeust/testng/commit/31cc17da840d31682daae6b283c0a8766c93bd13
---- In here go through the EmailableReporter.java
To generate reportNG reports please make sure, default TestNG Listeners is disabled.
It can be done by following the below steps:
- Right Click on the project.
- Right Click on Properties
- Click on TestNG.
- You will find an option as "Disable default listeners", check the checbox
- Click on "Apply" button, it will show as message as "Project preferences are saved".
- Now Click on "OK" button.