How to configure Selenium HTML Reports in Jenkins

为君一笑 提交于 2019-12-21 05:13:12

问题


We have a Java MOJO configured in Jenkins. Once the code is build in CI, surefire reports would be generated. We have Junit and Selenium test cases to test the application.

I need to present the results coming from the test cases in a HTML format. Is there any plugin available for Jenkins to display the content in HTML format?


回答1:


First you need to install the Selenium HTML Report Plugin. If you are not aware of installing the plugin, use this link

After installing the Selenium HTML report plugin, Add the post build script to generate the HTML content from the surefire reports. Use the following screenshot for configuring the HTML plugin..

Change the ProjectRoot with your MOJO




回答2:


  1. Install "Selenium HTML Report Plugin" into jenkins.
  2. In the post build action add below actions.

    action 1: Publish Selenium HTML Report

    value: */(Job Name)/workspace/   --> note: (place your test resultFile in this folder)

    action 2: Publish Selenium Report

    value: */(Job Name)/workspace/.html

This way we can generate a successful selenium report.



来源:https://stackoverflow.com/questions/13082425/how-to-configure-selenium-html-reports-in-jenkins

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