2

I am new to unit testing, but I want to experiment with xunit in F# (in a fresh VS2015 install). I created a new library, ran:

Install-Package fsunit.xunit

... and I can create a test:

[<Fact>]
let test () = "Yay"

, but when I right-click and do "Run Tests", it doesn't find my test.

When I search the extensions, there's a "xUnit.net runner for Visual Studio" in the online search results, but it says "NO LONGER NEEDED. Please un-install this extension." So I don't want to install that.

What am I missing, to enable the tests to be discovered and run?

Overlord Zurg
  • 3,430
  • 2
  • 22
  • 27

1 Answers1

3

I needed to install both the FSunit package and this test runner:

Install-Package fsunit.xunit -prerelease
Install-Package xunit.runner.visualstudio

(The current released version does not support the latest version of xunit, hence -prerelease.)

Overlord Zurg
  • 3,430
  • 2
  • 22
  • 27
  • ...although, the version of xunit that is installed with fsunit.xunit seems to be an older version that doesn't contain a lot of fancy stuff I am reading about, like Theory. Maybe fsunit.xunit is not maintained any more? – Overlord Zurg Oct 08 '15 at 22:37
  • 1
    The prerelease version supports xUnit 2.x. – CaringDev Oct 08 '15 at 23:05