ServiceMessages in JUnit tests

Hi all,

I have some troubles getting service messages to work with some runners.

I want to print some metrics just to draw some "statistics" graphs, so i put this to stdout:

##teamcity[buildStatisticValue key='METRICNAME' value='VALUE']

and then I add a graph in TC config.

I have performed these experiments:

- in a Rake runner it works
- in "Command" runner it works
- in a ANT / Junit execution it DOESN'T work
- in a .NET MSBuild / NUnit execution it DOESN'T work

how come?


Comment actions Permalink


I have the same problem with service messages from NUnit.

If NUnit is started via the the NUnit runner or the TC MSBuild NUnit task service messages are ignored.

If I start NUnit via a different MSBuild task the service messages work.

There is no difference if I write the service message to the standard output or to error output.

Log when it does not work:

[13:47:12]:             [Demo.Demo.StatisticTest.ReportValueTest] [Test Output]
##teamcity[buildStatisticValue key='StatistivTestValue' value='744.575']

Log when it does work:

[15:16:00]:                                     [MSBuild.ExtensionPack.CodeQuality.NUnit] ##teamcity[buildStatisticValue key='StatistivTestValue' value='744.575']



Please sign in to leave a comment.