Friday, October 26, 2012

xUnit Visual Studio Integration

Good news, everyone! It is actually very easy to get xUnit completely integrated with Visual Studio. You only need to install two plugins...

VS2010 - xUnit Test Runner Extension

This will support running tests with a Visual Studio test project.
This includes all of the VS features, such as code coverage!

ReSharper - xUnit Contrib Plugin

This will allow ReSharper to detect and run xUnit tests.
(If you are still running Resharper 6, then you will need the latest: v6.1.1)

Team Build (TFS) Integration

Integrating with xUnit your Team Foundation Server is a very tricky proposition, but it can be done. That, however, is a (rather long) blog post for another day!

Shout it



  1. Any luck on Integrating xUnit with Team Foundation Server. I am able to do that but test case filtering by traits doesn't work.

    1. Yes, but back on TFS 2010 it was a very tricky proposition. Your needed to install the xUnit runner on the TFS server, execute the runner against your test assembly, convert the output to NUnit, and then convert that output to what TFS was expecting and have it get sent in their their build hooks.

      However, it is my understanding that things are a LOT easier as of TFS 2012. I found one simple answer in this StackOverflow post about using the now officially supported Visual Studio plugin:

      Sorry that I cannot be more specific, it has been a long time since I got that working.


Real Time Web Analytics