Logo




Subscribe:
RSS 2.0 | Atom 1.0
Categories:

Sign In


[Giagnocavo]Michael::Write()

# Friday, May 07, 2010
F# Unit Testing with Visual Studio 2010

In Visual Studio 2010, you can now get your F# unit tests loaded by the IDE. First, create your F# test project. This is just a normal library referencing Microsoft.VisualStudio.QualityTools.UnitTestFramework and having test classes and so on. The only change you need to do is go into the configuration and set the output folder to "bin" for both debug and release (instead of bin\debug).

Next, create a C# Test Project, and delete the code file. Then add an existing item, and navigate to the bin directory of your test project output. Select the DLL and Add as Link.

Finally, right click the solution, and change the project dependencies so the C# test project depends on your F# test project.

That's it. Now the IDE will pickup your F# tests and allow you to manage, run, and debug them right from VS. You may have to restart the IDE after setting all this up for it to work smoothly. 

Code | FSharp
Friday, May 07, 2010 4:57:57 AM UTC  #    Comments [2]  |  Trackback

Wednesday, May 26, 2010 8:27:43 PM UTC
Holy amazingness Batman! How did you figure that one out? It is awesome!

Now I just need the SDK released so I can compile and run the tests in CI on TeamCity and things will be super golden.
Sunday, June 27, 2010 6:37:56 PM UTC
This sounds great. However, I'm not able to get this working. Is there any way you could provide a working example, eg. as a download?

Regards
Magnus
OpenID
Please login with either your OpenID above, or your details below.
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview