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
Related
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?
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.
I am using jenkins to run jobs that uses maven with cucumber . my jobs are running succesfully. I have also managed the plugin Cucumber report in jenkins. But when i view the report i am getting the message as shown in below picture.
I have tried to install various plugins like Jenkins plugin, standalone but with no joy. These are shown as options in the bottom right of the report.
Any clue is helpful. I have tried to check this error in stackover flow also. I didnt get any clue
I could see the reports file in xml which is created by surefire plugin. Any way i can achive reporting part in my project
I managed to get reports in jenkins now.
Previously Jenkins is unable to find the json file in my project.
I have set the path of json file as target and i could able to see the reports.
This might help for those who are looking for answer.
#CucumberOptions(
features= "C:\\Users\\dd pc\\workspace\\PracticeCucumber\\src\\main\\java\\com\\qa\\feature\\Test.feature",
glue= {"com\\qa\\stepDefinition"},
format= {"pretty","html:test-output_1",
"json:target/cucumber-reports/CucumberTestReport.json"},
plugin = ("json:target/cucumber-reports/CucumberTestReport.json"),
monochrome= true,
dryRun= false
)
I am able to solve by providing **/*.json
under Post-build Actions/Cucumber Report/JSON Report Location/ File Include Pattern = **/*.json
First of all in runner file we need to provide following plugin as follows: plugin= {"json:target/cucumber.json" }
Now in Jenkins job, in "post build" section during configuration, add cucumber reports, click on advanced option and provide 'target' text in "JSON Reports Path" text field. Save the job, it will run and will work fine.
Note: target text is the name of folder which we have provided in runner file for generating reports in Json, also cucumber report plugin works on json so need to generate report in json.
I my case the problem was in two jobs over the same test repository (one for Chrome one for Firefox), where one deletes report files after the job while second job was already running and vice versa.
I got a brand new Jenkins machine running on Linux Ubuntu. I use HTML Publisher Plugin to publish my html reports. I also use Jsystem to invoke the test scenario.
Jenkins 1.643
Html Publisher Plugin 1.10
At the end of the test when open the latest html report from the project main page I get this error:
Checksum mismatch
The checksum of the current wrapper file (0dd0c5ec07dff1d7179f03b5deb290e96ac68f8c) does not match the recorded checksum (090f21ac5f8c4b0eed9e789145a2fe2a6134c900). This indicates a possible security issue, therefore Jenkins will not serve this file. You can access the archived HTML files here.
I have checked existence of file and permissions. If I open the report from the job page then everything works.
UPDATE:
When I open the report from the job page I have no CSS and many errors.
Looks like a security issue.
UPDATE 2:
CSS and Javascript are back, Jenkins had an update on their Content Security Policy. Added args to the Jenkins startup scripts. First issue is still on. :(
It is a bug in that version of the HTML publisher plug in. The bug happens if you have more than one report in your job, mark the publishing option: 'Keep past HTML reports' and then click on the second report.
https://issues.jenkins-ci.org/browse/JENKINS-32281
Solution in https://jenkins.ci.cloudbees.com/job/plugins/job/htmlpublisher-plugin/61/.
Solution is released as 1.11 of the plug in.
it worked for me: Blocked script execution in <URL>. because the document's frame is sandboxed and the 'allow-scripts' permission is not set
System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "")
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.