Update: Visual Studio 11 Beta is now available to the public. We've released the runner for xUnit.net for VS11 Beta in the Extension Gallery.
Update: Visual Studio 11 Developer Preview is now available to the public.
Earlier this week at the //build/ windows conference, Jason Zander announced the availability of a new "developer-focused" unit test runner in Visual Studio 11. They shipped the first Developer Preview of Visual Studio 11, and it includes this new unit test runner. Peter Provost demonstrated the pluggability of this new unit test runner by showing (and writing) tests written in xUnit.net. We collaborated with Peter and wrote the prototype runner that he used on stage during his demos.
Today, I put an unsigned VSIX of the prototype unit test runner up for download on CodePlex. This is still rough code, and has one known issue right now, but if you're willing to live on the bleeding edge by running VS 11 Developer Preview, then just step over a little farther with us and run our plugin. :)
The plugin is entirely self contained. After running the VSIX (and restarting Visual Studio, if necessary), the new Unit Test Window feature will light up with your xUnit.net tests. This prototype is driven around binary inspection, not source code inspection, so the unit test window will update whenever you build your project. There should be no other steps necessary: just load any project that has xUnit.net tests in it, build it, and the tests should now be runnable from within Visual Studio. (Make sure to make the unit test window visible by going to View > Other Windows > Unit Test Explorer.)
The known issue sometimes manifests itself as one or more error messages in the output window's "Tests" tab, which say:
System.AppDomainUnloadedException: Attempted to access an unloaded AppDomain. This can happen if the test(s) started a thread but did not stop it. Make sure that all the threads started by the test(s) are stopped before completion.
Yes, that's a big scary message, but in my limited testing, it doesn't appear that it should have any impact on the actual running of the tests. I'm currently investigating the cause of the issue, but I wanted to get you all a prototype to play with as soon as possible.
Obviously, this is early code, so we really appreciate your feedback, particularly if you find any issues (especially functional and performance issues). The long term plan, once Visual Studio 11 gets a little closer to release, is to offer this plugin via the Extension Gallery. If for some reason you need to uninstall the plugin, you can do it via Visual Studio's Tools > Extension Manager functionality.
Happy testing!
xUnit.net running its own unit tests in Visual Studio 11 Developer Preview