# NCover with NUnit 2.4.8

**URL:** https://www.finalbuilder.com/forums/t/ncover-with-nunit-2-4-8/1329
**Category:** Discussion
**Created:** [September 24, 2009, 2:43am UTC](https://www.finalbuilder.com/forums/t/ncover-with-nunit-2-4-8/1329 "2009-09-24T02:43:09Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [September 24, 2009, 2:43am UTC](https://www.finalbuilder.com/forums/t/ncover-with-nunit-2-4-8/1329/1 "2009-09-24T02:43:09Z")

</div>

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&nbsp;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

&nbsp;

**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 -  
&nbsp;&nbsp; OS Version: Microsoft Windows NT 6.0.6002 Service Pack 2  
&nbsp; 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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Test fixture to be loaded (Short format: /load=STR)  
/run=STR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name of the test to run  
/config=STR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Project configuration to load  
/xml=STR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name of XML output file  
/transform=STR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name of transform file  
/xmlConsole&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Display XML to the console  
/output=STR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; File to receive test output (Short format: /out=STR)  
/err=STR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; File to receive test error output  
/labels&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Label each test in stdOut  
/include=STR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; List of categories to include  
/exclude=STR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; List of categories to exclude  
/domain=X&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AppDomain Usage for Tests  
/noshadow&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Disable shadow copy when running in separate domain  
/nothread&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Disable use of a separate thread for tests  
/wait&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Wait for input before closing console window  
/nologo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Do not display the logo  
/nodots&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Do not display progress  
/help&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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.  
&nbsp;

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [September 28, 2009, 7:41am UTC](https://www.finalbuilder.com/forums/t/ncover-with-nunit-2-4-8/1329/2 "2009-09-28T07:41:17Z")

</div>

The NCover action uses the NCover.Console.exe - not nunit.   
  
 You need to specify the path to your NCover install in the FinalBuilder options.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [September 29, 2009, 11:49am UTC](https://www.finalbuilder.com/forums/t/ncover-with-nunit-2-4-8/1329/3 "2009-09-29T11:49:00Z")

</div>

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:   
&nbsp;

> 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

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [September 29, 2009, 1:50am UTC](https://www.finalbuilder.com/forums/t/ncover-with-nunit-2-4-8/1329/4 "2009-09-29T01:50:28Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [September 29, 2009, 2:36am UTC](https://www.finalbuilder.com/forums/t/ncover-with-nunit-2-4-8/1329/5 "2009-09-29T02:36:07Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [September 30, 2009, 3:14am UTC](https://www.finalbuilder.com/forums/t/ncover-with-nunit-2-4-8/1329/6 "2009-09-30T03:14:40Z")

</div>

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.
