JUnit test results are not displayed if they are taken from Gradle cache
Completed
TeamCity displays results for junit tests in Gradle build step that were actually executed and doesn't display results taken from Gradle cache. Gradle cache and changes in number of tests are both very important for us. Any suggestions or workarounds? Thanks
Please sign in to leave a comment.
Hi Val,
there are two ways to get test reports out of build runs in teamcity (in general, not just in gradle): either the test runer reports them directly, or XML reports are generated at the end of the build and then an XML report parser using the XML Report Processing build feature picks up the report and loads it into the build data. The former allows teamcity to show the results live as they happen, while the second allows to get results from non-default test runners.
Normally, the gradle runner reports the tests directly, but if this tests are not being run and the results are just being loaded from a cache, that will make it hard for teamcity to pick up the results on the fly, so if the xml report generated by gradle does contain the cached tests, or can be tweaked to generate them, adding the xml report processing feature would help.
More info about this feature here: https://www.jetbrains.com/help/teamcity/xml-report-processing.html
I have not found any reference to the cached tests issue in our database, so you might want to send a feature request about it to our tracker: https://youtrack.jetbrains.com/issues/TW. I am not sure how much of this feature would be on teamcity or on gradle to support, but having a reference to it would be helpful to see what we can do to address it from our own end.