How does TeamCity find test results?

The project I work on uses a special "wrapper" for JUnit for our tests. Because of this, we cannot easily use the ]]> ant task. So, we are having a hard time getting TeamCity to understand that tests are running and show success/failures. Does anyone know what triggers TeamCity to know this or where TeamCity looks to find this information?



Sorry for long the delay. The question is still actual with latest TeamCity release?

Kind regards,


i have the same problem. we run junit test from an own build system.

and if we get messages like:
Tests run: 9, Failures: 1, Errors: 0, Time elapsed: 11.958 sec
ERROR Test com.mycompany.AllIntegrationTests FAILED

[14:16:17]: [inttc]  INFO Testcase: testFetchMarketData2(com.mycompany.MyTest):     FAILED
[14:16:17]: [inttc]  INFO expected:<1> but was:<0>
[14:16:17]: [inttc]  INFO junit.framework.AssertionFailedError: expected:<1> but was:<0>

the build is
[14:16:18]: [inttc]  INFO BUILD SUCCESSFUL

but still some tests failed but unless you consult the log files you would never know.

Grues Alem


TeamCity can automatically obtain test results if JUnit is started by Ant, Maven, or IDEA project runner.
In other cases you can configure your custom JUnit launcher to save test reports to XML files, and then enable XML Report Processing build feature within TeamCity.



thank you it worked!
i had to make junit create xml reports and import them afterwards in TeamCity.


I'm glad to hear, it helped.

But unfortunately, this approach does not allow us to obtain test results on the fly, so you have to wait until whole build is finished to found it failed by very first test.


Please sign in to leave a comment.