2
votes

I'm a beginner on TeamCity, so forgive my dump question. For some reason the coverage reporting for my solution is not working. So, to run the tests I run nunit-console in a command line step and then use the xml output file in a build feature of type [XML report processing]. Test results appear on the TeamCity GUI but no coverage statistics. It seems to be that there a way to configure the tests reporting manually https://confluence.jetbrains.com/display/TCD8/Manually+Configuring+Reporting+Coverage but I don't know where to put these service messages:

teamcity[dotNetCoverage ='' ='' ...]

2

2 Answers

5
votes

Just write them to standard output. It is captured by TeamCity and service messages from it will be processed.

Pay attention, however, to the syntax. Service message should begin with ##

2
votes

As Oleg already stated you can dump them in standard output

Console.WriteLine(...) from C#
echo from command prompt or powershell, ...

Here is an example http://log.ld.si/2014/10/20/build-log-in-teamcity-using-psake

There is a psake helper module, https://github.com/psake/psake-contrib/wiki/teamcity.psm1 and source is available on https://github.com/psake/psake-contrib/blob/master/teamcity.psm1 (you can freely use this from powershell as well)

It has already implemented alot of Service Messages