ReportNG HTML report not updating

醉酒当歌 提交于 2019-12-04 02:15:34

问题


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!


回答1:


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




回答2:


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.


来源:https://stackoverflow.com/questions/38515453/reportng-html-report-not-updating

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!