TestDriven.Net + MbUnit Gotcha
That caused some issues.
I just run into a hairy issue in using TestDriven.Net and MbUnit. For some reason, none of my [SetUp] methods would run. I have moved machine with a project, and on the desktop, everything was peachy, on my laptop, [SetUp] doesn't work.
I am using MbUnit version: 1.0.2614.40165
And here is the test output:
No tests found
Starting the MbUnit Test Execution
Exploring Tests.Integration, Version=0.1.248.0, Culture=neutral, PublicKeyToken=null
MbUnit 1.0.2642.28107 Addin
No tests found
TestCase 'M:Tests.Integration.Policy.NewPolicy.MakeOrBreak'
failed: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
Tests.Integration\BaseWebTest.cs(117,0): at Extranet.Tests.Integration.BaseWebTest.ClickLink(String partialElementId)
The issue was a version mismatch, yuck! This doesn't usually happen on NUnit because NUnit is very version tolerant, and it looks like MbUnit is much less so.
Comments
I've seen it before. You're absolutely right it's a version issue. I usually remove reference to MbUnit.Framework from the project reference and then insert it again. It works for me. I hope that someone can suggest a better solution.
MbUnit is up to version 2.3 RTM, why are you still using 1.0? I only ask because I haven't run into problems with TD.NET and MbUnit in a loooong time.
This is actually version 2.4, the version number on the assembly does not reflect the project version.
Ah! I see. Nevermind then... ;)
Only the TD runner is not versioned using 2.4.* the MbUnit assemblies are.
There some work we can do to help report this issue from the td.net runner. I will look at getting this into the 2.4 RTM.
Ayende can I ask that further issues that you may encounter be reported to the mailing list so we help provide assistance and keep track of the issues. Blogs are not the best medium for this.
This is not something that I consider a issue. A mismatching configuration is more like it.
Have no fear. The design for MbUnit v3 specifically calls for improved version tolerance.
In the meantime it is important that the exact same version of MbUnit.Framework that your project is compiled with is registered for use with TD.Net. That should be done by default by the MbUnit installer.
That is exactly what happened.
The problem was that I moved machines, and the versions there were different.
Comment preview