Publishing test results
Now that we have run some tests using Karma we will also get our test reports. We had three; the JUnit report, which shows us the test results; the Cobertura reports, showing us how much of our code is covered by tests; and the HTML coverage report, showing exactly what lines are tested and not tested.
JUnit report
The easiest one to implement is the JUnit report as it comes straight out of the box. Simply configure the Publish JUnit test result report
post-build action. The report can, of course, be found in the test/junit/
folder (after building). We need any XML files, so the complete pattern for the reports field is test/junit/*.xml
:

After that, you can make another build and the test results will be published to Jenkins. You can find the results in your build on the left-hand side menu under Test Result
. Alternatively, there is a drop-down menu in the build overview on the left-hand side (the one with the red and blue balls). The dropdown has a Test Result
menu...