# get test support for XUnit and NUnit in VS11 beta

after banging my head against the wall because the test runner did not find my tests I finally found the reason: you have to install additional plugins into VS11 (beta).

And it seems like they are not part of the extension-manager lib at the moment.

You can find the plugin for NUnit here: NUnit Test Adapter (Beta) and the plugin for XUnit here: xUnit.net runner for Visual Studio 11 Beta.

Both work like a charm for me (after restart of VS11 of course).

## Performance comparison

To get a quick overview I choose to test all three possibilities with this test-code:

module Utilities =

/// This is a sample function
let sampleFunction argument1 argument2 =
argument1 + argument2

[<TestClass>]
type TestUtilities() =

[<TestMethod>]
member test.sampleFunction mit 5 und 4 ergibt 9() =
Assert.AreEqual(9, Utilities.sampleFunction 5 4)

[<NUnit.Framework.TestFixture>]
type NUnitTests() =
[<NUnit.Framework.Test>]
member test.NUNIT - sampleFunction mit 5 und 4 ergibt 9() =
Assert.AreEqual(9, Utilities.sampleFunction 5 4)

type XUnitTests() =
[<Xunit.Fact>]
member test.XUNIT - sampleFunction mit 5 und 4 ergibt 9() =
Assert.AreEqual(9, Utilities.sampleFunction 5 4)



With this I get the following result (tested 10times with “Run all” and 4 times each with “Run selected” – the values won’t change too much on my machine):

MS-Test: ~8ms

NUnit: ~9ms

XUnit: ~167ms

Don’t understand why XUnit is that slow and maybe it’s only the first loaded test, but I will stick with Nunit anyway.