Angular 4 - Can't see build errors in header

We have a pretty “vanilla” Angular 4.4.6 app that we are running the Angular unit tests with Karma using the following command:

./node_modules/.bin/ng test --single-run --no-progress --browser=ChromeHeadless --reporters=junit

In our package.json we have the DevDependency karma-junit-reporter. In a recent build in which we started running this suite we had a test failure (which was indeed a true test failure), but the failure did not show up at the top of the build as expected. We had to open up the test-results.xml test artifact to see what the failure was.

I’ve searched on this forum and the internet in general about this problem, but I can’t see that we’re doing anything differently than anyone else. Are my expectations that the test failures would be reported at the top of the build not correct?

Oh…and here’s a link to the build with the failure:

I looked at the build. I think its reporting from tape-results.xml and not including ng-test-results.xml.

I think the main issue is that these two files appear to be using two different types of reporters. Even if you merged them together the results would be invalid.

Thanks for the info. I had forgotten that we needed to merge test results together. I’ll see about correcting the different reporters (which I thought were all using the JUnit format) and then merging them appropriately.

1 Like


I had a go at getting the failed tests to appear at the top of the build page. I managed to get it to work, so I put the configuration up here: Repo on Github.

This is an example of when the tests fail


I notice you’re using the ng command from node modules. Do you find that is better than using npm or yarn to run the commands?