JetBrains.BuildServer.NUnitLauncher.exe doesn't recognise NCover as a plugin

Hi All,

I am busy trying to get NCover to run as the command line runner in TeamCity.  I am using the "JetBrains.BuildServer.NUnitLauncher.exe" it clearly states that a plugin option is NCover but when I try to run the command line I get the following error:

JetBrains.BuildServer.NUnitLauncher.exe ANY MSIL NCover /ncover:"C:\Program Files (x86)\NCover\NCover.Console.exe" NUnit-2.5.5 /category-exclude:Medium
TeamCity is unavailable. Messages will be printed to standard output
2010-10-20 14:24:41,438 [5384] ERROR JetBrains.BuildServer.NAntLoggers.CommandLi
ne.CommandLineArgumentsParser - No test runner plugin found in the list: NCover
2010-10-20 14:24:41,448 [5384] ERROR JetBrains.BuildServer.NAntLoggers.NUnitLaun
cher2 - Failed to parse with JetBrains.BuildServer.NAntLoggers.CommandLine.Comma
ndLineArgumentsParser
JetBrains.TeamCity.Utils.CommandLineParseException: Failed to select test runner
plugin
   at JetBrains.BuildServer.NAntLoggers.CommandLine.CommandLineArgumentsParser.P
arse(String[] args) in c:\BuildAgent\work\e34bdcb45e12f223\src\NUnitBootstrap\sr
c\CommandLine\CommandLineArgumentsParser.cs:line 52
   at JetBrains.BuildServer.NAntLoggers.NUnitLauncher2.Parse(String[] args) in c
:\BuildAgent\work\e34bdcb45e12f223\src\NUnitBootstrap\src\NUnitLauncher2.cs:line
211
Failed to select test runner plugin
2010-10-20 14:24:41,459 [5384] ERROR JetBrains.BuildServer.NAntLoggers.NUnitLaun
cher2 - Compatible parser was not found
JetBrains.BuildServer.NUnitLauncher.exe @@ <xml-arguments-file>

JetBrains.BuildServer.NUnitLauncher.exe {v1.1|v2.0|mono-1.0|mono-2.0|ANY} {MSIL|
x86|x64} Plugin{|Plugin...}

Plugin NCover:
  /ncover:<path to NCover.Console.exe> [/ncover-arg:<arg>]* [/ncover-arguments:<
arguments line>] [/ncover-platform:<MSIL|x86|x64|NATIVE>@<v1.1|v2.0|ANY|NATIVE>]

Where:
  /ncover-arg: argument should be repeated for every argument of NCover
  /ncover-arguments: argument should be excaped to be passed to the program as o
ne argument

Plugin PartCover:
  /partcover:<path to PartCover.exe> [/partcover-arg:<arg>]* [/partcover-argumen
ts:<arguments line>] [/partcover-platform:<MSIL|x86|x64|NATIVE>@<v1.1|v2.0|ANY|N
ATIVE>] [/partcover-reg:true]
Where:
  /partcover-arg: argument should be repeated for every argument of NCover
  /partcover-arguments: argument should be excaped to be passed to the program a
s one argument

Plugin NUnit-*:
[/category-include:categories] [/category-exclude:categories] [/addin:addins] [/
runAssemblies:processPerAssembly] <assembly>[(;| )<assembly>[...]]
Supported plugin names:
  NUnit-2.2.10
  NUnit-2.2.9-VSTS
  NUnit-2.2.9-VSTS-9.0
  NUnit-2.4.1
  NUnit-2.4.6
  NUnit-2.4.7
  NUnit-2.4.8
  NUnit-2.4.8-resharper
  NUnit-2.5.0
  NUnit-2.5.2
  NUnit-2.5.3
  NUnit-2.5.4
  NUnit-2.5.5
  NUnit-Auto




2010-10-20 14:24:41,485 [5384] ERROR JetBrains.BuildServer.NAntLoggers.NUnitLaun
cher2 - Failed to parse arguments


I realise in this examlpe I am nto passing all the arguments but no matter what I passed the same error occured:

No test runner plugin found in the list: NCover


Any ideas?  Does this plugin even exist?

Cheers
Andrew Fraser

6 comments

NCover is not a plugin in terms of TeamCity NUnit Launcher. Try this:

JetBrains.BuildServer.NUnitLauncher.exe ANY MSIL NUnit-2.5.5 /ncover:"C:\Program Files (x86)\NCover\NCover.Console.exe"  /category-exclude:Medium <assemblies to test>


.NET Coverage is an extension for the test runner. Plugin here is referred to test runner implementation.

0

Hey Eugene,

Thank you for the answer, it has got me further along the path but there is still a problem.  When I try to give ncover arguments it can't parse them?

[17:32:02]: Start process: C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe ANY x86 NUnit-2.5.5 "/ncover:C:\Program Files (x86)\NCover\NCover.Console.exe" "/ncover-arg:////x coverage.xml" /category-exclude:Medium assemblies
[17:32:02]: in: C:\BuildAgent\work\2d8a43ed13a65032
[17:32:02]: 2010-10-22 17:32:02,769 [5720] WARN   JetBrains.TeamCity.Utils.Runtime.ProcessRun - Selected .NET v2_0 to start the process for ANY .NET Framework option
-----
[17:32:03]:
***************** Exception *****************
[17:32:03]: -------------------------------------------------------------------------------
[17:32:03]: NCover.Console is returning exit code #20000
[17:32:03]: ---- Top level exception: System.ArgumentException
[17:32:03]: Unrecognized command line option: '//x coverage.xml'
[17:32:03]:    at NCover.Framework.Configuration.CoverageConfigParser.Parse(String[] commandLineArguments)
[17:32:03]:    at NCover.Framework.Configuration.ConfigFactory.ParseCoverageConfig(String[] arguments)
[17:32:03]:    at NCover.ConsoleMain.ConsoleMain.RunCoverage(String[] args, IOutputWriter output)
[17:32:03]: -------------------------------------------------------------------------------
[17:32:03]: Process exited with code 20000
[17:32:03]: Publishing artifacts
[17:32:03]: [Publishing artifacts] Paths to publish: [teamcity-info.xml]
[17:32:03]: [Publishing artifacts] Publishing files
[17:32:03]: Build finished


As you can see I tried "/ncover-arg:////x coverage.xml".  I had to include the extra /'s as I think the command line thinks they are escape characters.  Any ideas?

Cheers
Andrew

(ps I removed the assembly names)

0

Please replace:
"/ncover-arg:////x coverage.xml"

with:
/ncover-arg://x /ncover-arg:coverage.xml

0

Hey Eugene,

Fantastic, that did the trick!  I will now attempt to get the html report integrated into TeamCity... Thank you again for the assistance!

Cheers,
Andrew Fraser

0

Once again thank you for your assistance in getting this running.  Is there a way to get the results from NCover integrated into the TeamCity GUI when using the command line like I am in the same way that they integrate when using a build runner like the .sln runner?

The other question I had is how to get the trending to work for the command line.  I got the generation of trend data to work correctly (located outside the build folder so that it maintains it's data for future trends) but as this command line only calls Ncover.console.exe not the reporting executable I can't give it the lt (link trend) command argument to include the previously generated trend data in the report.  Any ideas?

One other point to raise is that the main reason I am doing all of this command line work is that I am trying to setup TeamCity to build on our build server and to perform testing (including coverage testing) on our test machines.  Perhaps there is a better way to go about that?

Cheers
Andrew Fraser

0

Please sign in to leave a comment.