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!

https://github.com/quetzalcoatl/xvsr10/downloads

ReSharper - xUnit Contrib Plugin

This will allow ReSharper to detect and run xUnit tests.

http://xunitcontrib.codeplex.com/releases/view/92101
(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

Enjoy,
Tom

2 comments:

  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.

    ReplyDelete
    Replies
    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: http://stackoverflow.com/questions/25915075/tfs-build-server-2013-and-xunit

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

      Delete

Real Time Web Analytics