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.
Publishing test results
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...