Allure Jenkins Plugin generating invalid links in html report - jenkins

I am using Allure jenkins-plugins for report generation and everything is fine except one thing - all links inside allure html report is broken: e.g. expected link to build in 'executors' section should look like:
http ://localhost:8080/job/MyJob/1
but I'm getting:
http ://localhost:8080/job/MyJob/allure/nulljob/MyJob/1
and
Not Found
error on click as per below screenshot:
Please, help me figure out what reason might stand behind this?

Problem solved after setting 'Jenkins URL' as suggested in subsequent answer:
Cannot compute absolute URL when generating Allure report with plugin in Jenkins

What is your Jenkins version ?
Did you make sure your security settings are OK ?
https://github.com/allure-framework/allure1/issues/715#issuecomment-180474020
Mor

Related

Unable to generate cucumber reports in jenkins. net.masterthought.cucumber.ValidationException: None report file was added

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.

Change SpecFlow+ runner report output link

We are using Jenkins in our build cycle to run our specflow tests. We are trying to find a better way to surface the test results. The generated html report file is great, but right now we have to manually log into the build server to check it out. I want to surface that file via a clickable link.
Here is what I am talking about specifically. Here is the test results via our Jenkins console
I want to change the highlighted text to an http url so that everyone can just click that and view the file.
I already have the http link working, so that's not the issue. I just need to figure out how to make specrun output this link here.
Any ideas on if this is possible? And if so how to do it?
Thanks for the help!
Sorry, this is currently not possible in SpecFlow+Runner, but I will put it on the backlog as a feature request.
Perhaps you can do something in Jenkins to parse the output and reformat the link.
Full disclosure: I am on of the developers of the SpecFlow+Runner.

Jenkins and HTML Publisher Plugin create reports awfull

BAD
GOOD and SHOULD BE
Ricently after update my HTML Publisher Plugin up to 1.1 1version (My Jenkins core Jenkins ver. 1.652) I have got HTML report created looking so bad. After I recover to older previous version is still looks bad.
So problem is that I can't go back to nicelly created reports as before.
BUT My index.html file which I try to export to Jenkins looks so perfect in the browser.
Can you please help me with any ideas?

How do I fix a Jenkins HTML report "checksum mismatch"?

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", "")

jenkins jacoco code coverage html report goes missing after sometime

I have jenkins setup ready, up and running and after every build it calculates code coverage and display code coverage trend graph as well detailed HTML report.
But when I click on the same link to check my detailed HTML report I see a blank page something like this
I am using 1.0.16 version of jenkins jacoco plugin.
Any clue
Finally have got the solution for this. Posting incase someone is facing same issue.
This is actually a bug which has been raised here
https://issues.jenkins-ci.org/browse/JENKINS-23708
In the bug you will find attachment called jacoco.hpi, upload this file onto jenkins and then restart the server. This will work.

Resources