Using MSTest with F #

Is it possible to use MSTest with F # in VS2010. People have asked this question many times. But I can not find a solution among the answers. Could anyone use MSTest testing for F # or should I stick with NUnit?

+6
unit-testing f # mstest
source share
3 answers

I think you should stick with NUnit. Have a look here: http://connect.microsoft.com/VisualStudio/feedback/details/564586/make-using-mstest-more-accessible-to-f-projects . There is no progress on this issue.

+1
source share

Yes, you can use MsTest with F # in VS2010. At the most basic level, using [<TestClass>], [<TestMethod>] and related attributes will allow you to run tests from the command line using mstest (in the VS command window). Also, if you use the trick described here: http://www.atrevido.net/blog/2010/05/07/F+Unit+Testing+With+Visual+Studio+2010.aspx , you can use about 95% VS2010 support for unit tests.

In particular, you can use the test list editor, run tests from VS2010 in normal or debug mode, and view the test results in VS2010.

If you support version VS2010, code coverage will also work for F # unit tests.

One of the functions that does not work is to go to the unit test source by double-clicking on the test from the test results viewer.

I was also able to combine the MSTest and FsCheck tests.

+3
source share

A more relevant answer (if still limited to vs2010) will include

I have MsTest Non-Confirmation via Daniel Mohl mstest template

Although I have no idea if any or all of them will work against vs 2010

0
source share

All Articles