Executing NUnit Tests using the Visual Studio 2012 Test Runner
- by David Paquette
At a recent Visual Studio 2012 event at the Calgary .NET User Group, I was told that I could run my NUnit tests directly in the Visual Studio 2012 without any special plugins. Naturally, I was very excited and I immediately tried running my NUnit tests. I was somewhat disappointed to see that the Test Runner did not discover any of my NUnit tests. Apparently, you do still need to install an extension that supports NUnit. Microsoft has completely re-written the Test Runner in Visual Studio 2012 and opened it up for anyone to write Test Adapters for any unit test framework (not just MSTest). Once the correct test adapters are installed, everything works great. Luckily, there are a good number of adapters already written. Here are some Test Adapters that you might find useful: NUnit Test Adapter – This one is still in beta, but tit does work with the official Visual Studio 2012 release xUnit.net Test Adapter Silverlight Unit Test Adapter Chutzpah Test Adapter Overall, I still prefer the unit test runner in ReSharper, but this is a great new feature for those who might not have a ReSharper license.