TeamCity build not showing unit test results with the Gradle Wrapper

Answered

Hi everyone,

Did someone manage to get gradle builds with the wrapper to show unit test results?

We switched from local gradle installation on the build agents to use the gradle wrapper.

TeamCity builds stopped displaying test results when the wrapper is used.

We're using both TeamCity 8.1 and 10.0.3 and this happens on both versions. We're using gradle wrapper version 3.2

When I look at the build agent working folder, I can see the HTML results in the "build/reports/tests/test/" folder of each of the modules, so the tests are executed and produce results. However, the results tab in the TeamCity build does not appear.

The only change we made to the TeamCity build is to tick the "Use gradle wrapper to build project" checkbox.

Any help will be greatly appreciated 

Thanks,

Eyal


 

 

0
5 comments

Do you have some third party plugins installed?

0
Avatar
Permanently deleted user

Hi Pavel,

On the TeamCity server version 8.1 (build 29879) we have the following plugins:

Artifact Deployer - Version 0.5 - Nikita Skvortsov
Artifactory - Version 2.2.1 - JFrog Ltd.
Atlassian Stash integration - Version 0.1 - Mendhak
CA Release Automation - Version 5.0.6.1 - CA Technologies
Commit Status Publisher - Version snapshot-20151905133037 - JetBrains, s.r.o.
Node.js build runner - Version 1.0.76 - Eugene Petrenko
Simple Build Tool (Scala) - Version snapshot-20150802215515 - JetBrains, s.r.o.
Static UI Extensions - Version 0.4.6 - JetBrains, s.r.o.
TeamCity TAP Output Parser - Version 0.1 - n/a

 

The Gradle builds without using the wrapper show unit tests results correctly, it stops working when marking the checkbox and building using the wrapper.

Any ideas?

Thanks for the help!

Eyal

0

Hi Eayl,

Can I take a look at the build logs for both builds?

0
Avatar
Permanently deleted user

Hi Nikita,

Please see these two logs:

Local Gradle build showing test results:

 

https://groups.google.com/group/eyal_storage/attach/1bf269f3e282a/build_gradle_local_with_test_results.log?part=0.1&authuser=0 

Gradle wrapper build not showing tests

https://groups.google.com/group/eyal_storage/attach/1bf269f3e282a/build_gradle_wrapper_no_test_results.log?part=0.2&authuser=0 

We are building Scala code and using com.github.maiflai:gradle-scalatest:0.14 plugin to run the tests.

The test reports are generated (I have set them as artifacts in the build) on the agent in the path:

%teamcity.build.checkoutDir%/**/build/reports/tests/test/*.html

Thanks!

Eyal

 

 

0

Hello Eyal,

From what I can see, you have Gradle 2.9 installed locally and Gradle 3.2 in your wrapper. Please align versions. I suggest using Gradle 2.9, as it gives better results.

0

Please sign in to leave a comment.