We run CI tests via Jenkins and review the results via Jenkin's Console Output. If one of the tests doesn't pass, it is printed to the Console in red. Nevertheless, the output is very long and it is tedious to search the entire log to find instances of red output. Are there any good solutions to the issue?
For instance, Gerrit's user interface displays file diffs and a user can use keyboard shortcuts n or p to jump to the next/previous diff block. Is there any such solution/plugin... for Jenkins?
There's the Collapsing Console Sections Plugin:
This plugin allows the creation of sections in build consoles.These sections can be individually collapsed to hide unimportant details. A floating outline widget is available to navigate through all the sections of a build.
and the Console Parser Plugin:
The console parser plugin parses the console log generated by the Jenkins build allowing for:
...
highlighting of errors, warnings , and info
...
separating the comparison log by sections
collapsible sections for faster viewing
You should use a reporting plugin in Jenkins corresponding to the test framework you have used in your project. e.g. If you are using TestNG , then Jenkins has a publish TestNG reports plugin for filtering out test results.
Similarly for Cucumber - there is pretty cucumber reports plugin.
Related
We utilize our Jenkins environment to run various tests and jobs daily. Recently we have noticed some instability in our environment - I want to document our passed/failed tests cases that are outputted in the console output. I want to search thru the console output to pull specific tests or script names and have the jobs associated with those tests show up.
Using the Jenkins build history search tool, I'm only able to search thru the job title (name), property & value page (page you see after go into that job). My question: can you search through the console output via the jenkins build history tool?
Thanks in advance
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
Background: we have like ~50 Jenkins jobs (and more to come) executing Cucumber scenarios and generating and posting reports using Cucumber Reports Plugin.
Problem: Cucumber reports can be inspected only one by one; I mean, we have to go through all the jobs and to check the relevant reports.
Question: Is there an already existing solution to create a Jenkins Dashboard View and to put there all the reports (column view, matrix view, whatever)? I tried Dashboard View plugin, but does not support Cucumber reports. Radiator View Plugin did not fix my problem either. I would like to have a single dashboard view and to see all the Cucumber reports for the added test execution jobs.
I had the same problem. I could not find anything. I solved it by writing a simple app that combed the cucumber-reports directories and read the cucumber-trends.json files.
I then output this to an html page that I landed in userContent.
Whole process took about a day, less time than I spent looking for a pre-made solution...
When I run grails tests via jenkins I can check the console to see everything passed.
I'll see something like this:
Tests PASSED - view reports in /Users/me/developer/gradlemucks/grails_2/hello-world/target/test-reports
Is there anyway I could put in a hyperlink somewhere in Jenkins to the test reports so that I could just click thru to the report? Thanks
According to the testing guide, Grails outputs both .html and .xml formatted results from the tests by default. You can configure Jenkins to read the .xml files:
Install the JUnit or xUnit plugin.
Add a Post-build Action to Publish JUnit test result report.
Set Test report XMLs path to build/test-results/*.xml (or whatever path your JUnit .xml output files are dumped to).
This will permit you to click through the tests run for any build from the left sidebar within Jenkins.
Have you looked at the Side Bar Link Plugin? It allows you to add arbitrary links to the left side menu of a job.
My Jenkins builds our code, via a batch script build step. The output/error streams are captured and displayed in the build page. Can I do something to highlight the errors? For example, I would like to colour in red all the lines that contain the string error SOME_CODE, and in yellow all the warnings.
Can this be done?
The Log Parser Plugin can do this:
The log-parser plugin allows to parse the flat console log generated
by the Hudson build. It does this by :
highlighting lines of interest in the log (errors, warnings,
information)
dividing the log into sections
displaying a summary of number of errors , warnings and information
lines within the log and its sections.
linking the summary of errors and warnings into the context of the
full log, making it easy to find a line of interest in the log
showing a summary of errors and warnings on the build page