7

I have generated custom XML reports through testing. is it possible to display these XML with Jenkins? If possible, then how to display it with Jenkins?

SpKel
  • 542
  • 5
  • 15
PrathamN
  • 194
  • 1
  • 1
  • 11
  • In every build u will b having workspace folder, which shows up in Jenkins gui. There u can have your xml reports. Is this what u r asking or did i got u wrong :D – Vivek Singh Jan 22 '15 at 10:39
  • I hope my answer in similar question can help you https://stackoverflow.com/a/64693159/2347210 – Vladi Nov 05 '20 at 10:15

5 Answers5

4

If it is a homebrewed XML, I would suggest that you first convert it to HTML then use the HTML Publisher Plugin

https://wiki.jenkins-ci.org/display/JENKINS/HTML+Publisher+Plugin

Otherwise, mark it as a build artifact and allow users to download it from the Jenkins job.

Jocce Nilsson
  • 1,658
  • 14
  • 28
3

First you have to:

  1. Configure listeners in your testNg.xml file.
  2. Write the listeners classes.

Then, configure Jenkins to show the custom report after your builds:

  1. Go to "Post-build Actions" -> Choose "publish html reports".
  2. Add your directory where the custom report is, for example: /test-output
  3. Add the index file under Index page[s], for example: custom-report.html

Run your build an see your custom html report on Jenkins.

Eyal Sooliman
  • 1,876
  • 23
  • 29
2

Install HTMLPublisher plugin in Jenkins and after that perform the steps mentioned by Eyal

1

There is this summary display plugin as well: https://wiki.jenkins.io/display/JENKINS/Summary+Display+Plugin

Sample summary display from XML

Fakrudeen
  • 5,778
  • 7
  • 44
  • 70
0

Badge plugin

Usage in a pipeline:

def icon = "info.gif"
createSummary(
  icon: icon,
  text: """<h1>My Custom Summary</h1>"""
)
Moshe
  • 4,635
  • 6
  • 32
  • 57