This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
2 Replies Last post: Jan 22, 2014 7:16 PM by Pavel Sher  
Moreno Carullo Newbie 7 posts since
Jul 8, 2011
Currently Being Moderated

May 24, 2013 9:40 AM

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?




neredera Newbie 1 posts since
Jan 21, 2014
Currently Being Moderated
Jan 21, 2014 7:38 PM in response to: Moreno Carullo
Re: ServiceMessages in JUnit tests



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']




Pavel Sher JetBrains 2,443 posts since
Mar 6, 2008
Currently Being Moderated
Jan 22, 2014 7:16 PM in response to: neredera
Re: ServiceMessages in JUnit tests

Please watch / vote for this issue:

More Like This

  • Retrieving data ...