1

I am trying to import code coverage statistics from Clover into TeamCity so that I can set build failures if the level falls too low.

I am trying to get TeamCity to read in statistics from the .bat build script, but I'm not having any luck. I've tried getting my script to print out different variations of service messages to stdout but TeamCity doesn't pick them up.

The service messages aren't printed in the build log, nor can I see them in the "Reported Statistics Values" tab in TeamCity.

The below is a list of the different ways I've tried to get TeamCity to read the messages:

echo ##teamcity[enableServiceMessages]
##teamcity[enableServiceMessages]
##teamcity[buildStatisticValue key='CodeCoverageS' value='52']
echo ##teamcity[buildStatisticValue key='CodeCoverageS' value='50']
echo ##teamcity[buildStatisticValue key='CodeCoverageL' value='45']
echo ##teamcity[buildStatisticValue key='CodeCoverageAbsCTotal' value='888']
echo ##teamcity[buildStatisticValue key='KashCC' value='50']
echo ##teamcity[blahblah key='KashCC' value='50']
echo ##teamcity[setParameter name='ddd' value='fff']
##teamcity[blahblah key='KashCC' value='50']
##teamcity[key='KashCC' value='51']
##teamcity[buildStatisticValue key='CodeCoverageS' value='50']
Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
Kash.
  • 242
  • 1
  • 3
  • 15

1 Answers1

1

So the answer was to print the ##teamcity statements in a separate build step.

Once that is done they are picked up in the "Reported Statistics Values" tab

Kash.
  • 242
  • 1
  • 3
  • 15