On Friday, Jim Newkirk announced a new .NET testing framework called xUnit.net. So far, I really like the looks of it – things like getting rid of [TearDown] in favor of making the test disposable and adding Assert.Throws instead of [ExpectedException].
And while I agree with a lot of the reason’s behind Jim’s post, and his and Brad’s work on the project, looking at their comparison page tells a lot. To do Unit Testing with Java, you pretty much use JUnit. For Ruby, it is built in. For .NET, you have:
- NUnit (plus different versions)
- MSTest (In Visual Studio)
To make it more challenging, two of the frameworks – MSTest and xUnit.NET, are written by Microsoft people. Yes, MSTest is the “official” product, but since Jim and Brad have been important parts of Patterns and Practices and CodePlex inside Microsoft, they are still employed by Microsoft.
Is this a good thing? Some would argue yes – having choice is always a good thing. I just wish that either we as a .NET community could have one standard, or Microsoft would stop restricting its people from working on open source projects so that NUnit could be both an integral part of Visual Studio and benefit from enhancements like these.
But congrats to Jim and Brad (and all those that helped with the project) – it looks like a great start, and I’m looking forward to diving more into it.