Jenkins plugin - how to create multiple pages for displaying report - jenkins

I'm developing a Jenkins plugin for displaying reports of my own tool. I got difficulties because Jenkins lacks documentation for developing plugins. Currently, my plugin can only display report on a build page
Screenshoot (surroneded by red border):
http://imgur.com/a/5WvsA
But I want multi-page reports like the Junit plugins on this video:
https://www.youtube.com/watch?v=lWw9AQqUAGU&t=174s (2:56)
How to make a Jenkins plugin that can display reports on multiple pages?

If you want to go through the JUnit Plugin code below is the starting point to dig into it.
TestResultAction
Refer the below link for an article for you to start.
jenkins-plugin-development

I have accomplished this by utilizing ANT build scripts which generate HTML report files after running all of my JUnits.
You could simply publish JUnit results (represented in HTML files) to a public_html directory on a web server which can then be accessed via web browser, displayed on Jenkins dashboards via iframe, etc
Just add this plugin and publish the JUnit results.

Related

Cucumber HTML Report

I am using cucumber.js and producing a .json report after an execution. I am executing my tests from a Jenkins which is not connected to any internet.
I am using cucumber-html-reporter to generate the html report. The html report is created but the report on the Jenkins is not displayed correctly. Styles and css are broken as it is not able to download it.
Any way by which i can display the html report correctly without breaking images and styles on the Jenkins without having any access to internet. Or any other reporter which I can use to display the report correctly.
I am assuming that you have added the dependency in your maven project to generate the reports. I believe you must check this plugin.
https://plugins.jenkins.io/cucumber-reports/
You can install the aforementioned plugin in your jenkins instance and then you can publish the json report with the help of this plugin. Otherwise you can create your custom html report by reading the required data from cucumber json report and once it is done, you can publish that html report in the jenkins.
It is even worthy to check the below jar file that I have created for the cucumber reporting.
https://github.com/frostyaxe/CucuReporter

HTML Publisher plugin not showing reports for previous builds

I am using HTML publisher plugin to report a html file from Surefire reports generated in /target/** folder, but when I click on HTML report on the project page it redirects me to only previous build and not the ones built before that.
My use case is that there are 3 stages in my test suite and I want to publish a report for each stage separately or provide a link to it. If not HTML publisher, which other plugin would you suggest for my use case?

Getting access to the allure report statistics in Jenkins (tests with Webdriverio)

I have a set of tests which run within Jenkins and at the end of the tests (in the post section) I generate an allure report. The tests are created with Webdriverio.
The last time I did anything like this, I was using standard selenium running with Junit and due to that combination, the Jenkins Rest API had access to things like failedCount, skipCount, passes and failed counts. This however seems to only be possible with JUnit.
Does allure expose this to Jenkins somehow - or am I going to have to try and scrape the statistics from a pre-generated report?
(as a side note, I have tried to configure a second reporter in webdriverio, but while that seems to create some xml files locally, the folder I configure is not appearing on Jenkins. Also, webdriverio doesn't support JUnit as a framework - currently it's using mocha.)
I eventually managed to figure this out.
There is url which you can go to to get a json file with the summary information.
So if you report is at /allure - then you navigate to /widgets/summary.json

How to email reports created by ReportNG using Jenkins?

How to email the reports created by ReportNG using Jenkins?
I have done ReportNG set-up which is perfectly giving the reports to me and I have integrated my suite with Jenkins. But I don't know how to send the reports created by ReportNg as mail via Jenkins. Because, only if we have the entire html folder, the ReportNG works and able to see html report since there are dependencies in the ReportNG so I have to zip and send the entire html folder to see the perfect result.
Note : I am using Emailable-Ext plugin in Jenkins.
You can get the report links from your jenkins server where the reports are saved. And just email the link to the stakeholders, instead of emailing entire report.
Also, you can try jenkins plugins to automatically move the reports to some other machine/directory for future purpose (if needed) and email the links.

How to extract data from Jenkins and display it a customized webpage

I am currently using Jenkins for my build system and i have integrated several plugins with it. Can I extract the data in Jenkins and display it on a customized webpage?
For example, I am using the cobertura plugin to display my test coverage results. I want all the data that are being displayed by cobertura (eg. the graphs...) to be displayed on a customized webpage that i have (outside of Jenkins).
Here is all Jenkins propose :
Jenkins Remote access API

Resources