Reputation: 105037
I've defined the following F# file:
module MyFsTest
open NUnit.Framework
open FsUnit
[<Test>]
let ``1 + 1 = 2``() = Assert.AreEqual(2, 1+1)
yet when I try to run them either through "Test Explorer" or "Right Click + Run Tests" a build is done yet no tests are detected/run:
------ Discover test started ------
========== Discover test finished: 0 found (0:00:00,0320018) ==========
After googling a bit I've found my approach seems to resemble the steps taken @ http://davesquared.net/2013/03/hello-world-testing-in-fsharp.html, so I was wondering if there's something else I might be missing?
Upvotes: 13
Views: 2240
Reputation: 243041
To use NUnit tests with the built-in Visual Studio test runner, you'd need to install the NUnit test adapter. This is available for Visual Studio 2013, but I believe it is not possible to install it as an extension to the Express edition.
However, the Express edition includes support for the Microsoft Visual Studio testing framework, which is supported by the built-in test runner. The usage should be pretty similar to NUnit - you'll just need different namespaces.
Upvotes: 11