ReportNG HTML report not updating

2019-02-20 06:26发布

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!

2条回答
虎瘦雄心在
2楼-- · 2019-02-20 07:08

To generate reportNG reports please make sure, default TestNG Listeners is disabled.

It can be done by following the below steps:

  1. Right Click on the project.
  2. Right Click on Properties
  3. Click on TestNG.
  4. You will find an option as "Disable default listeners", check the checbox
  5. Click on "Apply" button, it will show as message as "Project preferences are saved".
  6. Now Click on "OK" button.
查看更多
何必那么认真
3楼-- · 2019-02-20 07:26

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

查看更多
登录 后发表回答