This Question is Assumed Answered

1 "correct" answer available (4 pts) 1 "helpful" answer available (2 pts)
16 Replies Last post: Jul 16, 2010 6:55 PM by Marina Grechko  
Peter Mounce Newbie 70 posts since
Dec 23, 2005
Currently Being Moderated

Jan 14, 2010 6:18 PM

TeamCity 5.0.1 + NCover 3.2 - what _should_ happen?

I've set up TeamCity 5.0.1 and I'm building my project using rake, which includes running ncover to generate code coverage data.

 

I'm then using a service message [1] to publish this file to TeamCity - I'm seeing this happen by looking in the logs. [2]

 

However - I don't see a code-coverage tab, or a chart on the statistics tab for my build-config in the same way that I do for fxcop or nunit, for example.

 

What _should_ happen?  The manual page describing this is listed as being in draft status, but the product has been released...?

 

[1]

##teamcity[importData type='dotNetCoverage' tool='ncover3' path='C:/BuildAgent/work/7cf06bbc131e6c5d/project/build/out/reports/ncover/Foo.Tests.coverage.xml']

 

[2]


[14:52:03]: [Execute out/reports/ncover/Foo.Tests.coverage.xml] Branch Coverage: 47.08%
[14:52:03]: [Execute out/reports/ncover/Foo.Tests.coverage.xml] Coverage Xml: C:\BuildAgent\work\7cf06bbc131e6c5d\project\build\out\reports\ncover\Foo.Tests.coverage.xml
[14:52:03]: [Execute out/reports/ncover/Foo.Tests.coverage.xml] ##teamcity[importData type='dotNetCoverage' tool='ncover3' path='C:/BuildAgent/work/7cf06bbc131e6c5d/project/build/out/reports/ncover/Foo.Tests.coverage.xml']
[14:52:03]: Invoke ncover_reports (7s)
[14:52:03]: [Invoke ncover_reports] ** Invoke ncover_reports (first_time)
[14:52:03]: [Invoke ncover_reports] ** Invoke ncover_profile
[14:52:03]: [Invoke ncover_reports] mkdir -p out/reports/ncover/Foo.Tests/
[14:52:03]: [Invoke ncover_reports] Importing data from 'C:/BuildAgent/work/7cf06bbc131e6c5d/project/build/out/reports/ncover/Foo.Tests.coverage.xml' with 'dotNetCoverage' processor
[14:52:03]: [Invoke ncover_reports] Execute ncover_reports (7s)
Adam Cooper Newbie 4 posts since
Jan 14, 2010
Currently Being Moderated
Jan 14, 2010 7:55 PM in response to: Peter Mounce
Re: TeamCity 5.0.1 + NCover 3.2 - what _should_ happen?

I'm baffled by this problem as well. There are blog posts by various people suggesting how to *manually* get NCover reports setup using MSBuild, but I believe such advice was posted prior to TeamCity 5.0.

 

So I'd like an answer to this question as well. Now that we have an NCover option built into TeamCity, how do we get a coverage report tab to show up?

Eugene Petrenko JetBrains 2,282 posts since
Oct 4, 2004
Currently Being Moderated
Jan 19, 2010 8:40 PM in response to: Peter Mounce
Re: TeamCity 5.0.1 + NCover 3.2 - what _should_ happen?

Could you please attach a screenshot of your build configutation settings and build agent logs.

 

Have you specified NCover paramters and enabled .NET Coverage in the build configuration settings?

Eugene Petrenko JetBrains 2,282 posts since
Oct 4, 2004
Currently Being Moderated
Jan 21, 2010 3:42 PM in response to: Peter Mounce
Re: TeamCity 5.0.1 + NCover 3.2 - what _should_ happen?

You may specify necessary environment variable as reference to the build system property. Please have a look to 'Properties and Environment variales' section of build configuration.

 

What build runner do you use?

 

 

Is that possible to move to MSBuild runner (with a proxy project)?

If you fill all parameters of the .NET coverage the service message will start working.

 

Pleaes note, TeamCity NUnit launcher will automatically call NCover to capture coverage data for your tests.

Eugene Petrenko JetBrains 2,282 posts since
Oct 4, 2004
Currently Being Moderated
Jan 22, 2010 2:24 PM in response to: Peter Mounce
Re: TeamCity 5.0.1 + NCover 3.2 - what _should_ happen?

Could you please attach a full build log.

 

What build runner do you use?

Have you enabled .NET coverage there?

 

Thanks!

Marina Grechko JetBrains 600 posts since
Oct 12, 2009
Currently Being Moderated
Jan 28, 2010 2:04 AM in response to: Peter Mounce
Re: TeamCity 5.0.1 + NCover 3.2 - what _should_ happen?

Please send it to teamcity-feedback (at) jetbrains.com

Marina Grechko JetBrains 600 posts since
Oct 12, 2009
Currently Being Moderated
Feb 3, 2010 1:36 PM in response to: Peter Mounce
Re: TeamCity 5.0.1 + NCover 3.2 - what _should_ happen?

Peter,

 

Sorry for delay in replying. We have received you you e-mail and will reply you as soon as possible.

Eugene Petrenko JetBrains 2,282 posts since
Oct 4, 2004
Currently Being Moderated
Feb 3, 2010 2:35 PM in response to: Peter Mounce
Re: TeamCity 5.0.1 + NCover 3.2 - what _should_ happen?

Peter,

 

Sorry fow long delay.

 

TeamCity .NET Coverage support consists of 2 parts.

 

The first part is intergrated in the TeamCity NUnit runner (i.e. TeamCity.NUnit.Launcher.exe and <nunit2> task for NAnt and NUnitTeamCity task for MSBuild).

This part manages to start NCover process and make it gather coverage data from unit tests. Coverage results are sent to the server using the same service

message as you have used in you builds.

 

The second part of the support privides UI for configuring path to NUnit. If it was configured TeamCity NUnit test runner would have implicitly started NCover and

it whould have provided NCover log. Unfortunatly, this UI is only available for MSBuild, Sln2005 and Sln2008 build runner.

 

In cases you run gather coverage data without help of TeamCity you may use teamcity service message to publish coverage results. But, this message will only

work if NCover was enabled from the TeamCity UI. For your case it could be acceptable, but you will need to move to MSBuild build runner. You may start your

ruby build script from the MSBuild. This will make Coverage work.

 

Another approach is to copy run parameters from a build configuration with MSBuild and NCover to your ruby configuration. This way is not recommended, because

patched build configuration will not be editable from TeamCity web ui. Please let me know if you want to know more about this approach.

 

 

Another way to make NCover reporting in TeamCity from your rake script is to issue TeamCity statistics service messages as

described at

http://www.jetbrains.net/confluence/display/TCD5/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ReportingBuildStatistics

To include generated NCover report to the build results as a tab see

http://www.jetbrains.net/confluence/display/TCD5/Report+Tabs

Eugene Petrenko JetBrains 2,282 posts since
Oct 4, 2004
Currently Being Moderated
Feb 5, 2010 4:44 PM in response to: Peter Mounce
Re: TeamCity 5.0.1 + NCover 3.2 - what _should_ happen?

It's easy to make NCover3 reporter work for rake build, but the main issue is to specify necessary NCover3 parameters.

 

NCover3 integration contains of the following:

- show coverage graphs

- show html report generated by NCover3 in the 'coverage' tab

- start NCover from TeamCity NUnit launcher.

Marina Grechko JetBrains 600 posts since
Oct 12, 2009
Currently Being Moderated
Jul 16, 2010 6:55 PM in response to: Peter Mounce
Re: TeamCity 5.0.1 + NCover 3.2 - what _should_ happen?

The question perhaps no longer relevant. If it's not please leave а comment or create a separate thread.

 

Kind regards,

Marina

More Like This

  • Retrieving data ...