Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-22-2006, 11:51 AM
teognost teognost is online now
Registered User
 
Join Date: 05-25-2004
Location: Prague,Czech Republic
Posts: 200
Question NUnit running from NCover issue

Currently we have a NANT build and we intend to migrate to VisBuild.
In Nant build unit tests are run from Ncover -by launching Ncover this way:
"C:\Program Files\NCover\NCover.console.exe" "C:\Program Files\NUnit-Net-2.0 2.2.8\bin\nunit-console.exe" "XTests.dll" /noshadow //a "XTests" //ea "XA1;XA2"
and everything is ok(working dir is some E:\NGUnitTests).
XTests.dll is the tested assembly,XTests is the profiled namespace ,XA1 and XA2 are attributes to be excluded from tests.


In order to do the same in VisBuild I did this:
-created a NCover action
-In Input tab I have set:
Mode->Executable
Exec+Param->"C:\Program Files\NUnit-Net-2.0 2.2.8\bin\nunit-console.exe"
Working dir->E:\NGUnitTests
List of assemblies to profile->XTests.dll
Classes and methodes to exclude->XA1 on one line,XA2 on another line.
-In Output tab I have set:
Profile log file->%NG_UNIT_TESTS_DIR%\Results\NCover\Coverage.log
Coverage output file->%NG_UNIT_TESTS_DIR%\Results\Ncover\Coverage.xml
-In Option tab I have ticked the checkbox 'Show command line ...'
When running this action I would expect to see Ncover is launched in similar way with NANT.
Instead it is launched like this:
"C:\Program Files\NCover\NCover.Console.exe" "C:\Program Files\NUnit-Net-2.0 2.2.8\bin\nunit-console.exe" //w E:\NGUnitTests //l E:\NGUnitTests\Results\NCover\Coverage.log //x E:\NGUnitTests\Results\Ncover\Coverage.xml

so no mention of profiled assemblies nor of excluded attributes.
Also I see you cannot set the profiled namespaces for this step?

Because of this the step fails-as it is in the output of the step:

Command: C:\Program Files\NUnit-Net-2.0 2.2.8\bin\nunit-console.exe
Command Args:
Working Directory: E:\NGUnitTests
Assemblies:
Coverage Xml: E:\NGUnitTests\Results\Ncover\Coverage.xml
Coverage Log: E:\NGUnitTests\Results\NCover\Coverage.log

Waiting for profiled application to connect...Connected
Configuring Profiler...
******************* Program Output *******************
NUnit version 2.2.8
Copyright (C) 2002-2003 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole.
Copyright (C) 2000-2003 Philip Craig.
All Rights Reserved.

OS Version: Microsoft Windows NT 5.1.2600 Service Pack 2 .NET Version: 2.0.50727.42

fatal error: no inputs specified


Could you please tell me what I did wrong when setting this Ncover action?
Also how can I set the profiled namespaces?
I would like to have the same results like in NANT.
Thanks
Reply With Quote
  #2  
Old 11-24-2006, 10:53 AM
kevina kevina is online now
Registered User
 
Join Date: 03-27-2003
Posts: 825
You have uncovered a bug in the NCover action, attached is a fix for this problem. Replace the NCover.action file, found in the Actions folder of your VBP install folder - by default c:\program files\visbuildpro6\Actions with the updated file (zipped in attached NCover.zip).

To pass the /noshadow flag, just add it to the Additional options: field on the Options tab.

This bug fix will be included in a future updated build of Visual Build Professional v.6.
Attached Files
File Type: zip ncover.zip (1.7 KB, 2014 views)
Reply With Quote
  #3  
Old 11-24-2006, 02:36 PM
teognost teognost is online now
Registered User
 
Join Date: 05-25-2004
Location: Prague,Czech Republic
Posts: 200
I have followed your indications-initially it did not work but after I made some changes into action-it works ok.
I needed to set the action this way:
In Input tab I have set:
Mode->Executable
Exec+Param->"C:\Program Files\NUnit-Net-2.0 2.2.8\bin\nunit-console.exe" "XTests.dll"
List of assemblies to profile->XTests (so here should not be the dll name but the profiled assembly\namespace)
In Option tab :
Additional options->/noshadow /xml:"E:\UnitTests\XTests.dll.xml"

Thanks for your help!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 06:00 AM.


Copyright © 1999-2023 Kinook Software, Inc.