NCover with NUnit 2.4.8

Hi

I have discovered that NCover Action in FB 6 does not work with NUnit 2.4.8. If you use the tab Assemblies and Attributes and you add your tests here, the command will add "/a" to the command args, which does not comply to nunit-console.exe version 2.4.8. I hope I can get pass this by specifing custom arguments to the command.

Best regards,

Michael

 

NUnit usage:

NUnit version 2.4.8
Copyright (C) 2002-2007 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.

Runtime Environment -
   OS Version: Microsoft Windows NT 6.0.6002 Service Pack 2
  CLR Version: 2.0.50727.4016 ( Net 2.0.50727.4016 )


NUNIT-CONSOLE [inputfiles] [options]

Runs a set of NUnit tests from the console.

You may specify one or more assemblies or a single
project file of type .nunit.

Options:
/fixture=STR            Test fixture to be loaded (Short format: /load=STR)
/run=STR                Name of the test to run
/config=STR             Project configuration to load
/xml=STR                Name of XML output file
/transform=STR          Name of transform file
/xmlConsole             Display XML to the console
/output=STR             File to receive test output (Short format: /out=STR)
/err=STR                File to receive test error output
/labels                 Label each test in stdOut
/include=STR            List of categories to include
/exclude=STR            List of categories to exclude
/domain=X               AppDomain Usage for Tests
/noshadow               Disable shadow copy when running in separate domain
/nothread               Disable use of a separate thread for tests
/wait                   Wait for input before closing console window
/nologo                 Do not display the logo
/nodots                 Do not display progress
/help                   Display help (Short format: /?)


Options that take values may use an equal sign, a colon
or a space to separate the option from its value.
 

The NCover action uses the NCover.Console.exe - not nunit.

You need to specify the path to your NCover install in the FinalBuilder options.

Maybe I just lack the information for using this action. Could you guide me in the right direction? What is the basic option I need to set.

I have done the following with no luck:
Option:
- NCover path is set
- NUnit paht is set
Action:
- NCover what? is NUnit test covarage
- Coverage output file
- List of assemblies to profile (my unittest asseblies)

When I do this I get the following output:
 

NCover [NUnit: ]
Status: Completed
Date: 29-09-2009
Time: 11:46:20:087
End: 11:46:21:426
Duration: 00:00:01:339

Action Messages:
CommandLine: "C:\Program Files\NUnit 2.4.8\bin\nunit-console.exe" //x C:\Test\Test.xml //a "C:\ccviews\cc_build\cc_build_NGS_IHCStainer_int\NGSP\Platform\Source\Dako.Ngsp.UnitTest\bin\Debug\Dako.Ngsp.UnitTest.dll"
NCover.Console v2.1.2 (Administrator x86) - Code Coverage Analysis for .NET
Copyright (c) 2008 Gnoso Inc.
http://www.ncover.com

Registered to Customer #: 27637
NCover Enterprise Edition (3 Users)

Command: C:\Program Files\NUnit 2.4.8\bin\nunit-console.exe
Command Args:
Working Directory:
Assemblies: Dako.Ngsp.UnitTest

******************* Program Output *******************
NUnit version 2.4.8
fatal error: no inputs specified
Copyright (C) 2002-2007 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.

Runtime Environment -
OS Version: Microsoft Windows NT 6.0.6002 Service Pack 2
CLR Version: 2.0.50727.4016 ( Net 2.0.50727.4016 )


NUNIT-CONSOLE [inputfiles] [options]

Runs a set of NUnit tests from the console.

You may specify one or more assemblies or a single
project file of type .nunit.

Options:
/fixture=STR Test fixture to be loaded (Short format: /load=STR)
/run=STR Name of the test to run
/config=STR Project configuration to load
/xml=STR Name of XML output file
/transform=STR Name of transform file
/xmlConsole Display XML to the console
/output=STR File to receive test output (Short format: /out=STR)
/err=STR File to receive test error output
/labels Label each test in stdOut
/include=STR List of categories to include
/exclude=STR List of categories to exclude
/domain=X AppDomain Usage for Tests
/noshadow Disable shadow copy when running in separate domain
/nothread Disable use of a separate thread for tests
/wait Wait for input before closing console window
/nologo Do not display the logo
/nodots Do not display progress
/help Display help (Short format: /?)


Options that take values may use an equal sign, a colon
or a space to separate the option from its value.

***************** End Program Output *****************

Execution Time: 00:00:00.7841295s

Coverage Xml: C:\Test\Test.xml
NCover Success

Hi Michael

My apologies, I misread your first post. The problem appears to be that NCover has changed it’s command line interface between versions (not a good thing to do, command lines should be like interfaces!). We’ll take a look at this tomorrow and see what we can do.

I found a solution to this. In the NCover action in the Arguments field the UnitTest assemblies are specified and in the Assemblies to Profile a list of the assemblies we want coverage on.

Actually that’s not a work around, it’s how it supposed to work. We just had a look at the code, and the Command Arguments field is where you specify the assemblies for nunit to test. The Assemblies tab is for assemblies for NCover to test. We’ll update the help topic to reflect this.