Trouble Running MbUnit tests with TestDriven.net on Vista 64
Posted by Dave Bouwman | Posted in .NET, Devt Tools, Unit Testing | Posted on 05-08-2008
3
Ran into some odd behavior today – I had installed MbUnit and TestDriven.net a while back after re-paving my workstaion with Vista64, but had not used either since then (writing more proposals than code lately). I went to add some new tests to the ArcDeveloper Tile Server code-base and found that when I ran the test from the Solution Explorer context menu, they would not run.
In fact I got this message in the output window:
—— Test started: Assembly: TileServer.Core.Tests.dll ——
The target type doesn’t contain tests from a known test framework or a ‘Main’ method.
Nice. So something it likely messed up in the install. But for grins I tried running a test from the code window context menu – and it worked.
So clearly something is way jacked up. I un-installed TestDriven.net and MbUnit, and re-installed. No dice. Un-installed ReSharper, re-installed TestDriven.net and MbUnit. Nada. Repeat with various other options. Zilch. Googling turned up nothing. Yeech – not good.
Then I recalled getting an email from Greg Littlehales when I posted about switching to Vista 64… something about TestDriven.net. A quick search in Gmail pulled up the answer – there is a bug in the TestDriven.Net installer which causes it to put some registry entries in the wrong spot. Here’s the url of the issue over in Google Code: http://code.google.com/p/mb-unit/issues/detail?id=270
The response from Jeff Brown is…
The installer doesn't know how to create the right entries on x64 machines. We'll be fixing this in the new WiX-based installer as part of an upcoming release. In the interim, you can export the HKLM/Software/Wow6432Node/MutantDesign/TestDriven.Net/TestRunners key and import its contents back into HKLM/Software/MutantDesign/TestDriven.Net/TestRunners.
I fired up RegEdit, did the export, deleted all occurances of “Wow6432Node/” in the file and imported it back in. Once I did this, all was well in the world and I could go home (and hit Publish on this post!) So far this is the only issue I’ve run into with Vista (other than a client who’s VPN does not support Vista, so I run an XP VM to connect)
For others who may run into this, here’s the what I used – this assumes that everything was installed in default locations.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\MutantDesign\TestDriven.NET\TestRunners]
[HKEY_LOCAL_MACHINE\SOFTWARE\MutantDesign\TestDriven.NET\TestRunners\AdHoc]
@="40"
"AssemblyPath"="C:\\Program Files (x86)\\TestDriven.NET 2.0\\AdHoc\\TestDriven.AdHoc.dll"
"TypeName"="TestDriven.AdHoc.TestRunner.AdHocTestRunner"
[HKEY_LOCAL_MACHINE\SOFTWARE\MutantDesign\TestDriven.NET\TestRunners\Custom]
@="0"
"AssemblyPath"="C:\\Program Files (x86)\\TestDriven.NET 2.0\\AdHoc\\TestDriven.AdHoc.dll"
"TypeName"="TestDriven.AdHoc.TestRunner.CustomTestRunner"
"TargetFrameworkAssemblyName"="TestDriven.Framework, Version=2.0.0.0"
[HKEY_LOCAL_MACHINE\SOFTWARE\MutantDesign\TestDriven.NET\TestRunners\MbUnit]
@="10"
"AssemblyPath"="C:\\Program Files (x86)\\MbUnit\\bin\\MbUnit.AddIn.dll"
"TypeName"="MbUnit.AddIn.MbUnitTestRunner"
"TargetFrameworkAssemblyName"="MbUnit.Framework"
"Application"="C:\\Program Files (x86)\\MbUnit\\bin\\MbUnit.GUI.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\MutantDesign\TestDriven.NET\TestRunners\NUnit 2.2]
@="10"
"AssemblyPath"="C:\\Program Files (x86)\\TestDriven.NET 2.0\\NUnit\\2.2\\nunit.addin.dll"
"TypeName"="NUnit.AddInRunner.NUnitTestRunner"
"TargetFrameworkAssemblyName"="nunit.framework, Version=0.0.0.0-2.2.65535.65535"
"Application"="C:\\Program Files (x86)\\TestDriven.NET 2.0\\NUnit\\2.2\\nunit-gui.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\MutantDesign\TestDriven.NET\TestRunners\NUnit 2.4]
@="5"
"AssemblyPath"="C:\\Program Files (x86)\\TestDriven.NET 2.0\\NUnit\\2.4\\nunit.addin.dll"
"TypeName"="NUnit.AddInRunner.NUnitTestRunner"
"TargetFrameworkAssemblyName"="nunit.framework, Version=2.3.0.0-2.4.65535.65535"
"Application"="C:\\Program Files (x86)\\TestDriven.NET 2.0\\NUnit\\2.4\\nunit.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\MutantDesign\TestDriven.NET\TestRunners\NUnit_VSTS]
@="20"
"AssemblyPath"="C:\\Program Files (x86)\\TestDriven.NET 2.0\\NUnit\\2.2\\nunit.addin.dll"
"TypeName"="NUnit.AddInRunner.NUnitTestRunner"
"TargetFrameworkAssemblyName"="Microsoft.VisualStudio.QualityTools.UnitTestFramework"
[HKEY_LOCAL_MACHINE\SOFTWARE\MutantDesign\TestDriven.NET\TestRunners\VisualStudioTestTools]
"AssemblyPath"="C:\\Program Files (x86)\\TestDriven.NET 2.0\\VisualStudioTestTools\\TestDriven.VisualStudioTestTools.dll"
"TypeName"="TestDriven.VisualStudioTestTools.VsttTestRunner"
"TargetFrameworkAssemblyName"="Microsoft.VisualStudio.QualityTools.UnitTestFramework"
[HKEY_LOCAL_MACHINE\SOFTWARE\MutantDesign\TestDriven.NET\TestRunners\xunit]
@="4"
"AssemblyPath"="F:\\ArcDeveloper\\tileserver\\trunk\\Third Party\\XUnit\\xunitext.runner.tdnet.dll"
"TypeName"="XunitExt.Runner.TdNet.TdNetRunner"


I was running into a LOT of weirdness with my Windows Xp installation, so I figured I’d upgrade to Vista 64 instead of futzing with another re-do of Xp.






Since we are