MSBuild + NUnit + PartCover automations

I would like to invoke nunitlauncher from within my msbuild script directly (Instead of configuring partcover from teamcity webinterface)

We used to do it with teamcity 3.0 (.net 2.0 and ncover 2.0) - MSBuild produced a command line that looked like this:

c:\citools\ncover-2.0.2\ncover.console.exe C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher2.0.exe C:\TeamCity\buildAgent\work\490221ddc42a0ca5\build\test\TcpCommunicationTest\bin\Debug\TcpCommunicationTest.dll //reg //x C:\TeamCity\buildAgent\work\490221ddc42a0ca5\build\ncover-code-coverage.xml //ef .*Test.*;*Test\.dll;.*Test\.dll;*Test\.cs;.*Test\.cs;.*Designer\.cs //et JetBrains.*

In the script above, I pass the nunitlauncher instead of passing nunit directly (to ncover).
I tried the same with partcover but I think NUnitLauncher2.0.exe does not support .NET4.0

And the syntax in NUnitLauncher.exe seems different and I cannot get it to work.

Are there any resources about NUnitLauncher?
Any example where NUnitLauncher is being invoked manually?

Regards,

2 comments

I've been able to move forward.
When you execute nunitlauncher (latest version) you get the following message

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 one argument


Plugin PartCover:

  /partcover:<path to PartCover.exe> [/partcover-arg:<arg>]* [/partcover-arguments:<arguments line>] [/partcover-platform:<MSIL|x86|x64|NATIVE>@<v1.1|v2.0|ANY|NATIVE>] [/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 as 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


Altough v4.0 is not stated as an acceptable version you can still use it. So basically using this command parameterized the way I want it and service messages, I've been able to do what I wanted to.

0

You may try calling NUnitLauncher.exe with PartCover commandline options as showin in the help message of NUnitLauncher.
For more information, please see http://confluence.jetbrains.net/display/TCD6/Code+Coverage+tab

0

Please sign in to leave a comment.