Issue Running NCover 3 with TeamCity 5
Hi,
I am using NAnt runner to build an application and run some unit tests. All works fine, except NCover is not running. I enabled NCover for the NAnt runner, but I do not see the NCover running when I check my build logs.
Also, I noticed that the Code Coverage Settings information tab tells me the Code Coverage is disabled(see below), although I have selected NCover 3 from the drop downs in the runner. Our NAnt scripts are not using any teamCity special tasks, as they are running on CC.NET and TeamCity at the same time(migration to TeamCity underway) and we prefer not to modify them at this time. Do I have to use the TeamCity NUnit launcher for the coverage to work? is there another setting that I need to enable somewhere else(looked but couldn't find any). Help appreciated. Thanks...
Using NCover 3.3.2
Using TeamCity Professional Version 5.0.1 (build 10715)
Build file: xxxxxxxx.build
Working directory: same as checkout directory
Targets: none specified
NAnt home: C:\Program Files\nant-0.85\bin
Target framework: net-2.0
Command line parameters to NAnt.exe: Rebuild executeNUniTest
Reduce test failure feedback time: OFF
Path to NCover 3: C:\Program Files\NCover\ncover.console.exe
Run NCover under: x86
NCover Arguments: view
NCover Reporting Arguments: view
Report type: nunit
Please sign in to leave a comment.
Any help to this question is much appreciated from the community and Jetbrains. I have tried several other settings but so success yet.
What was paremeter values hidden by 'view' links for keys:
If those fields are empty, please fill those fields according to NCover documentation.
Thanks!
Thanks for the reply.
The settings I have:
NCover Arguments: //l C:\Coverage\Coverage.log //x C:\Coverage\Coverage.xml"C:\Program Files\NUnit 2.4.8\bin\nunit-console.exe" "\**\*.dll" /xml MyTestResult.xml
NCover Reporting Argument: FullCoverageReport:Html:{teamcity.report.path}.
With those setting, NCover is still not running.
In my original post, I indicated the following:
It seems that Code Coverage is diabled(see undelined senetnce below), but I am not sure this is for NCover since the settings are correct.
Type of runner: NAnt (Runner for NAnt build files)
Build file: e911\aurora\main\Common/common.build
Working directory: same as checkout directory
Targets: none specified
NAnt home: C:\Program Files\nant-0.85\bin
Target framework: net-2.0
Command line parameters to NAnt.exe: Rebuild RunNUnitTests
Reduce test failure feedback time: OFF
Path to NCover 3: C:\Program Files\NCover\ncover.console.exe
Run NCover under: x86
NCover Arguments: view
NCover Reporting Arguments: view
Code coverage: disabled string was from Java coverage. In the next line it was shown that .NET Coverage was enabled.
I've checked parameters you've sent to me:
Please fix it in the following way:
report path: //or FullCoverageReport:Html:{teamcity.report.path}
NCover args: //ias .*
Please note, you do not need to specify any parameters related to output files or to
program to run from NCover. All you need is to specify are coverage gathering parameters.
Thanks!
Thanks. I tried replacing the args and I am still getting nothing. NUnits are not running. I am not sure if my NANT runner is interferring with NCover and I don't see why it would. I read somewher on the forum that for NCover to work, my NUnit tests needs to be launched by the TeamCity NUnitTestRunner(or something close to that name). I appreciate your help. Any ideas? D you need more information?
many thanks
There are two way to start NUnit tests with NCover under TeamCity:
The first way: In your build script start NCover.Console with appropriate commandline and than
report generated NCover report .xml file to TeamCity.
Thanks for the prompt response again. The NUnit taks is not using <nunit2> and I guess that is the issue. I will modify it and then try it.