This project is read-only.

Using F# with Resharper's Test Runner

Topics: ReSharper test runner
Aug 17, 2011 at 8:36 PM


I'm trying to get xUnit tests in F# working with Resharper. I've referenced xUnit from my project, and I've followed the installation instructions for xunit contrib.

I can run C# unit tests with no problem. I get the fancy button in Visual Studio that allows me to run one unit test at a time. However, this same functionality is not available when using F#. I can create a unit test, but I don't get the button. If I go to the Resharper's menu and try to run all tests, I get the error message "No tests found in file."

What am I missing? Do I need some additional setup for F#? Any help is appreciated.

Aug 17, 2011 at 10:13 PM

Does Resharper even support F#? If it doesn't support it, then no unit test runners will work it, since the unit test runners in R# are based on R#'s code model.

Aug 18, 2011 at 2:49 PM

Yes you're right, Brad. Resharper doesn't support F#. I thought the xunit contrib plugin would bridge that gap. Thanks for the response.

Aug 18, 2011 at 4:37 PM

To follow up, do you have any recommendations for an alternative test runner for Visual Studio that will work with F# & xunit?

Oct 10, 2011 at 4:33 AM

schoolbob - TestDriven.NET is a Visual Studio integrated test runner that works well with F# & xunit. The only thing it seems to have trouble with is running individual tests on let bound functions in nested modules but otherwise no issues.