views:

598

answers:

2

Hello,

I've exchanged my dev machine (WinXP/32bit) to a new one (Windows 7/64bit). Now I have trouble running NUnit test from inside Visual Studio 2008. I'm using latest build of TestDrivenNet.

What I am looking for is either:

  • a) how to make TestDrivenNet work on Win7/64
  • b) looking for suggestion for alternative test runner. Free one preferred.

What is working on WinXp/32 (and is not working on Win7/64):

  • run one test method inside VS.NET
  • debug one test method inside VS.NET
  • run all tests in one class inside VS.NET

Symptoms on Win7/64:

  • when trying to run test the runner reports "0 passed, 0 Failed, 0 Skipped". It looks like it is unable to find any tests in my class.
  • tested with TestDriven.NET-2.22.2468 (RTM) and 2.23.2497 (beta). Same results.

Question:

  • Can you suggest a good working nunit test runner for Win7/64? Free variant is preferred.
  • Any suggestions how to make the testdriven.net runner work?
+3  A: 

Hi

I'm using win7 64 bit with TD.NET 2.22.246 and it works just fine. The only other Visual Studio runners exists are mstest (run only as 32 bit process) and TestMatrix (not free)

To check if it's a 64 bit issue you can build the test project as x86 and run the tests with TD.NET. In that case TD.NET will run as 32 bit process - You can verify it using the Task Manager and looking at ProcessInvocation.exe

If the tests run than its 64 bit issue. if it fails than maybe the problem is somewhere else. Are you using other tools in your tests? coverage, mocking etc, maybe the problem is in other place?

Ohad Horesh
SharpDevelop IDE has NUnit integration, but you also need to change projects to target x86 to make everything work smooth.
Lex Li
Thanks for the comment. SharpDevelop can build 64 bit assemblies but cannot run them with nunit? Strange since nunit has 64 bit runner.
Ohad Horesh
I've tried AnyCPU, x86 and x64 as platform targets. Same result. The TestMatrix is also unable to run the test suite. TDD can run test when using Test with NUnit 2.4 and Test with NUnit 2.5 from solution context menu. The Test with debuger and Test with coverage for solution does show only "0 passed, 0 Failed, 0 Skipped" message. No ProcessInvocation.exe nor ProcessInvocation86.exe is shown in task manager (I've tried with both enabled and dissabled "Cache test process between test runs"). Also no icon in tray notification area is displayed.
Martin Vobr
I've also tried the Resharper and it was able to run tests. If only the test runner for Resharper is available for sale separately. The rest of resharper package has altered the whole vs.net editor the way I don't like much :-(.
Martin Vobr
"other tool": I'm testing this on the clean vs.net 2008 project, only one class with [TestFixture] class attribute, one method with [Test] attribute. Net 2.0 as target platform, reference to nunit.framework.dll version 2.2.7. No other tools are involved.
Martin Vobr
It's working now. Uninstalling Resharper, reinstalling the TestDriven.NET and installing the (unrelated) DPack Visual Studio plugnin apparently changed something in VS.NET setup so the test can be run and debuged now. Unfortunatelly I have no clue which step woth the silver bullet :-(
Martin Vobr
I've got Resharper and TD.NET working nicely together so maybe the problem is TD.NET and DPack living together on the same machine. You might want to submit a bug to TD.NET.Anyway, glad you solved it :)
Ohad Horesh
A: 

My coworker got exactly same problem and he is able to provide a minimal fix this time. I'm reposting it here - maybe it would help someone else too.

It looks like the root cause of problem was Source Gear Vault 3.5.x. See their support forum post for details.

Submitting following code into registry solved the non working TD.NET:

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Interface\{6D5140C1-7436-11CE-8034-00AA006009FA}]
@="IServiceProvider"
[HKEY_CLASSES_ROOT\Interface\{6D5140C1-7436-11CE-8034-00AA006009FA}\NumMethods]
@="4"
[HKEY_CLASSES_ROOT\Interface\{6D5140C1-7436-11CE-8034-00AA006009FA}\ProxyStubClsid32]
@="{A4A1A128-768F-41E0-BF75-E4FDDD701CBA}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{6D5140C1-7436-11CE-8034-00AA006009FA}]
@="IServiceProvider"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{6D5140C1-7436-11CE-8034-00AA006009FA}\NumMethods]
@="4"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{6D5140C1-7436-11CE-8034-00AA006009FA}\ProxyStubClsid32]
@="{A4A1A128-768F-41E0-BF75-E4FDDD701CBA}"
Martin Vobr
Glad you find a solution. Can you tell me please does Source Gear installing an addin to Visual Studio?
Ohad Horesh
SourceGear Vault installs as a new source control plugin. It doesn't show itself among regular addins in VS.NET, so I guees that it's a special kind of addin. Fair to say that the Vault 3.5.x is not supported on Windows 7 and that they suggest upgrading to a 4.0 version.
Martin Vobr