#1
|
|||
|
|||
Error Running NUnit/NCover
I am running some NUnit tests Via NCover from Visual Build and getting a "Fatal execution engine error"
If I run the NUnit on its own all is ok. If I run the NUnit in NCover from the Command line all is OK When I run from a Run Program step in visuall build goes Bang. I have annother set of NUnit tests that run OK. Can anyone help I need to find out what is different between running from the Command line and running from Visual Build. It is Driving Me nuts Andy Farr |
#2
|
|||
|
|||
There's not much different at all; they both ultimately call CreateProcess to run a program. Using NUnit 2.2, NCover 1.3.3, and VBP 5.5, the following step:
<step action='Run Program' type='0'> <command>"C:\Program Files\NCover\ncover.console" /c "c:\Program Files\NUnit 2.2\bin\nunit-console.exe" mock-assembly.dll</command> <indent type='3'>1</indent> <name>Run NCover</name> <outputfrom type='3'>1</outputfrom> <startin>C:\Program Files\NUnit 2.2\bin</startin> </step> Ran without errors and produced this output: NCover.Console v1.3.3 - Code Coverage Analysis for .NET - http://ncover.org Command: c:\Program Files\NUnit 2.2\bin\nunit-console.exe Command Args: mock-assembly.dll Working Directory: Assemblies: Coverage File: Coverage Log: ******************* Program Output ******************* NUnit version 2.2.0 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.0.2195.0 .NET Version: 1.1.4322.573 .....N.N.N. Tests run: 5, Failures: 0, Not run: 3, Time: 0.050072 seconds Tests not run: 1) NUnit.Tests.Assemblies.MockTestFixture.MockTest5 : Method MockTest5's signature is not correct: it must be a public method. 2) NUnit.Tests.Assemblies.MockTestFixture.MockTest4 : ignoring this test method for now 3) NUnit.Tests.Assemblies.MockTestFixture.ExplicitlyR unTest : Explicit selection required ***************** End Program Output ***************** Copied 'C:\Program Files\NCover\Coverage.xsl' to 'c:\Program Files\NUnit 2.2\bin\Coverage.xsl' Do you have a reproducible test case? |
#3
|
|||
|
|||
Whoooooo I have fixed it
The problem occurs when the /v switch is used with ncover ???
I have removed this and all is now working It seemed to be specific too one set of unit tests but may be worth people knowing about in mind. Do not need to use the /v switch and not sure why I had turned it on. Also managed to replicate problem in a .bat file. Sorry for any time this took up and thank you for the assistance. Andy |
|
|