Teamcity not picking up stack traces of tests run with Maven Surefire

We're running tests using the Maven Surefire plugin on teamcity using a 'maven' buildStep. Teamcity automatically detects when tests fail but it never manages to attach the stacktrace and output. Under the stack trace heading it just says 'Build log is empty.'

When we click the 'Open in build log' button, it doesn't open it to the right place but usually it manages to open it somewhere near the actual failure, which is sort of helpful. Sometimes it just opens to the end of the log though and we have to find the failure ourselves which is a real pain.

I've tried to improve the detection by emitting service messages telling teamcity when the tests start and finish and giving stacktraces. That works really well, except that now teamcity double counts all the tests, showing one failure that it automatically detected and the same failure that we told it about using service messages, thinking they are two different failures.

Is there any way we can either turn off the auto detection to stop the double counting, or make it work properly so that we don't need the service messages?

0

Please sign in to leave a comment.