I tried setting up Allure Report with Jenkins, but every time the build is finished and I click on the report, it's opening a 404 page or NaN empty report page.
Attached are my configurations and below is stack trace:
[SeleniumJob] $ /var/lib/jenkins/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/allure/bin/allure generate -c -o /var/lib/jenkins/workspace/SeleniumJob/allure-report
allure-results does not exist
Report successfully generated to /var/lib/jenkins/workspace/SeleniumJob/allure-report
Allure report was successfully generated.
Creating artifact for the build.
Artifact was added to the build.
Finished: FAILURE
It seems allure-results does not exist but I can't find out why because I see it in the Jenkins workspace
This is how the link looks like once clicked on Allure in Jenkins: https://3.236.42.121/job/SeleniumJob/4/allure/
Thank you for your help!
Related
There is a Jenkins freestyle job that is triggered by some Gerrit events.In response to triggers, it downloads the changes and runs a Sonarqube Analysis. The Sonarqube comments detailing the results are to be posted on Gerrit after the analysis is complete.This is the expected behaviour.
As of now, In Jenkins, the Sonarqube execution is success. But the build is failed mentioning the error " *ERROR: Build step failed with exception java.lang.IllegalArgumentException: Gerrit change number is empty*
Could anyone please help on this?
Reference:https://plugins.jenkins.io/sonar-gerrit/
Followed the same steps as mentioned in the above document.
Jenkins console output
Expected: The Sonarqube should post the comments to the respective Gerrit change,whether the Sonar-verified is +1/-1.
I have set up a Jenkins multibranch-pipeline executing Postman tests using Newman. My used reporters are -r cli,htmlextra,junit,junitfull.
The HTMLEXTRA report does get published using the Jenkins htmlpublisher on the project level, however, only for successful Jenkins builds. In other words, only when all API tests pass, the HTMLEXTRA report is accessible directly from the project menu as you can see in the screenshot below.
For failing builds, the HTMLEXTRA reports do get created though and I can open them in the menu for each single Jenkins run, but not on the overall project level. There only the latest successful build report is linked.
My POSTACTIONS Jenkins stage looks like this:
post {
always {
archiveArtifacts artifacts: 'build/report.html', fingerprint: true
publishHTML (target: [ //DOCUMENTATION can be found here: https://plugins.jenkins.io/htmlpublisher/
allowMissing: false, //If checked, will allow report to be missing and build will not fail on missing report.
alwaysLinkToLastBuild: true, //If this control and "Keep past HTML reports" are checked, publish the link on project level even if build failed.
keepAll: true, //If checked, archive reports for all successful builds, otherwise only the most recent.
reportDir: 'build', //The path to the HTML report directory relative to the workspace.
reportFiles: 'report.html', //The file(s) to provide links inside the report directory.
reportName: 'Newman Test Report'
])
junit "build/report-full.xml"
}
}
My understanding was that if alwaysLinkToLastBuild and keepAll are both true, the link to the latest HTMLEXTRA report gets published on project level even for failing builds. See here the official documentation https://plugins.jenkins.io/htmlpublisher.
Can you help me, please, with publishing HTMLEXTRA reports on the project level even for failed Jenkins builds? Thanks a lot!
I have multiple xml result files collected from different builds and I have to display a consolidated report on jenkins.
Is there any plugin available to perform the above action?
We also tried JUnit plugin, we got the following error:
ERROR: Step 'Publish JUnit test result report' failed: Test reports were found but none of them are new. Did leafNodes run? For example, D:\jenkins\workspace\test-1\testng-results.xml is 14 min old
try to check the timestamp when the junit report was generated and last execution time of jenkins job. Both timestamp should match.
If you see a difference, delete the report and re-generate the report.
I have configured Jenkins Job for Sonar Quality Gate and Code Coverage. Below is the Jenkins job set Up. When I trigger the build I see below error. Most of my Jenkins jobs are failing because of this issue. Please help me out from this.
Jenkins Job setup
Error Logs
ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Error at line 2 of coverage report C:\Location.xml
at org.sonar.plugins.coverage.generic.GenericCoverageSensor.loadReport(GenericCoverageSensor.java:130)
at org.sonar.plugins.coverage.generic.GenericCoverageSensor.analyseWithLogger(GenericCoverageSensor.java:95)
at org.sonar.plugins.coverage.generic.GenericCoverageSensor.analyse(GenericCoverageSensor.java:91)
at org.sonar.plugins.coverage.generic.ReportParser.parse(ReportParser.java:82)
at org.sonar.plugins.coverage.generic.GenericCoverageSensor.loadReport(GenericCoverageSensor.java:126)
... 31 more
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
The SonarQube Scanner did not complete successfully
21:44:09.12 Creating a summary markdown file...
21:44:09.122 Post-processing failed. Exit code: 1
The answer is there in the log:
org.sonar.plugins.dotnet.tests.ParseErrorException: Missing root element 'test-results' in C:\UC\ProductEligibility\BTS\results.xml at line 2
So the results.xml is not valid xml and causes a parse error and kills the analysis. So whatever creates that file, is causing the issue in the end.
Try to remove that parameter to verify if the analysis runs correctly now.
Has anyone tried to use gatling plugin for jenkins, but without maven? I don't have maven project, but I generate results using Gatling from terminal (bash script). Using -rf switch I change results folder destination to /var/lib/jenkins/jobs/Gatling_test/builds/newest_build/results, but anyway there is error:
Archiving Gatling reports...
ERROR: Publisher com.excilys.ebi.gatling.jenkins.GatlingPublisher aborted due to exception
java.lang.IllegalArgumentException: Could not find a Gatling report in results folder.
at com.excilys.ebi.gatling.jenkins.GatlingPublisher.saveFullReports(GatlingPublisher.java:97)
at com.excilys.ebi.gatling.jenkins.GatlingPublisher.perform(GatlingPublisher.java:65)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)
at hudson.model.Run.execute(Run.java:1618)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:247)
Finished: FAILURE
Build just run shell script, and post-build action is set to Track a Gatling load simulation.
Thanks for any suggestions.
I think that you should send your results into the workspace of the job, not the job itself.
In the code the plugin looks for results in the workspace of the build.
Hope this helps!