flow.
"Flow is a condition of deep, nearly meditative involvement." - Tom DeMarco

Announcing MbUnitForms!

Monday, August 06, 2007 7:50 PM
MbUnit + NUnitForms = MbUnitForms

I've ported the popular NUnitForms to the MbUnit testing framework.  Let me be clear, I've made no bug fixes or added no features, I've only recompiled it to run against MbUnit.  Think of it as an API 'mashup', to still a phrase from the Web 2.0 kiddies

NUnitForms was great, but I ran into two issues with it:

1) I now exclusively use MbUnit for my unit testing and I was being forced to include references to NUnit simply to run NUnitForms.  Now I no longer need to reference NUnit, I can simply reference only MbUnit.
2) NUnitForms was compiled to run against NUnit 2.2 specifically which meant that if I was using NUnit, as I was on some previous projects, that I had to either include references to both the current version of NUnit and version 2.2 or simply use version 2.2 for all of my unit tests.  MbUnitForms no longer has this limitation.  Regardless of the version of MbUnit you are working against, as long as it is equal to or greater than the one that MbUnitForms was compiled against (currently 2.4) your code with execute just fine.

I also want to be clear, this is in no way a reflection on the work of Luke Maxon, the original creator of NUnitForms.  Luke has done an amazing job with this framework and he deserves all of the credit for this.  I've just simply taken his work and expanded on it.

Also, in keeping with the theme of updating the technologies involved, I've replaced any mocking that was done in the accompanying unit tests using NMock with Ayende's Rhino.Mocks.

Welcome to open source, the way it's supposed to be.


kick it on DotNetKicks.com

Feedback

# re: Announcing MbUnitForms!

I've used NUnitForms before, and I really liked it (had to develop a custom control, so it came in really handy), but I could never get it to play nicely with my build server, because CruiseControl runs as a service and there seems to be an issue where NUnitForms requires an active desktop to run its tests.


Have you got any advice for this scenario? 8/7/2007 4:31 AM | Terence Lewis

# re: Announcing MbUnitForms!

Hmm, good question Terrence.

I've used it before with CruiseControl and hadn't ran into to any issues. After looking around, it looks like it won't work if you have any modal dialogs. Apparently you get an InvalidOperationException if you try to create a modal dialog under a service. I've never really thought about that, but I suppose it does make sense. Here's a little more information on the problem. Unfortunately, it doesn't look like there's a solution...only the known issue that you can't test modal dialogs under a service:
http://wiki.yak.net/679

Good luck!
Jeremy 8/7/2007 8:14 AM | Jeremy

# re: Announcing MbUnitForms!

I have set up a Google alert that led me to this. :) Looks like a good idea.

Do you see a way that the nunitforms project could be made to work with both testing frameworks? It would make it easier to keep pace with updates if / when they happen. To lose the dependency on a specific version of NUnit would be nice as well. At least it might be possible to release versions for different frameworks together via a configurable build?

I've also used Rhino.Mocks more recently so that change would be welcome in the svn repository also.

Let me know if you'd like to work on this or if you would like to make any other contributions back to the project. Thanks! 8/8/2007 9:28 AM | Luke Maxon

# re: Announcing MbUnitForms!

Luke,

Thanks for the comment, I'm thrilled to see that you're on board with this!

I completely agree that if we could find a way to get the project to work with both testing frameworks that it would be much more beneficial. I would actually fee much more comfortable with that rather than forking the code permanently as I have done now.

Let me take some time to think about this, I"m sure that there is a way to separate our our dependencies so that we may take advantage of all of the xUnit .Net frameworks.

Thanks!
Jeremy 8/13/2007 8:58 AM | Jeremy

Post a comment





 

Please add 2 and 8 and type the answer here: