Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 31 million developers.Sign up
Have you ever wanted to make the code coverage, compiler warnings or some other build stat more visible? Well, now you can!
- Thanks to Mr. @dcendents and the PR #267, Build Monitor can display the build badges you set via the Groovy Post-Build Plugin (see below for more details):
This build brings a number of other improvements too:
- The status of the External Build Jobs is displayed correctly (#265, #266) - thanks @hschink!
- The animated build progress bar is displayed correctly in IE11/Edge (#272)
- Even though the anonymous analytics were not gathered if you opted out, the script was still loaded causing an unnecessary HTTP request. This is no longer the case. (#276) - thanks @larsrh!
- Instead of displaying the description of a failure set by the Build Failure Analyzer, Build Monitor now display its name making the information much more concise #275 - thanks @patrickdepinguin!
To set a badge:
- Install the Groovy Post-Build Plugin
- Add a
Groovy Postbuildpost-build action to a Jenkins project of your choice
- Configure the Groovy script to call either:
manager.addShortText(textToDisplay)which sets a badge with default colours
manager.addShortText(textToDisplay, textColour, backgroundColour, borderWidth, borderColour)which sets a badge using custom CSS attributes. For example:
manager.addShortText('Deployed', 'black', '#b4d455', '1px', 'green')
The above steps are documented in the acceptance tests, together with the accompanying screenshots.
If you wanted to show the number of failing unit tests, for example, you could read the data from the
TestResultAction object and configure the
Groovy Postbuild action as follows:
def result = manager.build.testResultAction.result def total = result.totalCount def failed = result.failCount manager.addShortText(failed + " / " + total + " failed")
You might be aware that I've been busy working on Serenity/JS, a next generation acceptance and regression testing library.
If you're working with modern web apps and have "learn some new tools" on your list of New Year's Resolutions or you're interested in doing acceptance testing at scale, please check out serenity-js.org and let me know what your think!