David Grenier
David Grenier

Reputation: 1110

MSTest F# - running tests in parallel

Following the guide mentionned here: Using MSTest with F# I managed to successfully run my unit tests.

I was wondering if anyone had tried and successfully managed to run tests in parallel?

How to run unit tests (MSTest) in parallel?

Thanks!

edit:

So I ended up deleting all solution items, removing the C# test project cleaned solution. Readded a new C# test project with Local.testsettings (I had Debug.testsettings and Release.testsettings - adding Local.testsettings manually hadn't fixed the problem). Fixed - running 5 tests in parallel.

Upvotes: 3

Views: 753

Answers (1)

Gene Belitski
Gene Belitski

Reputation: 10350

Yes, the composition of Using MSTest with F# and How to run unit tests (MSTest) in parallel? allows to run up to 5 F#-written local unit tests in parallel with VS2010/mstest on a multi-core box. The screenshot below shows TestMethod2() and TestMethod3() are running in parallel, while TestMethod4() has already being passed, and TestMethod1() is still pending.

Environment is VS2010 Premium/no SP1 running on 16-core box under Win2008R2; parallelTestCount attribute of <Execution> element in Local.testsettings is set to 2:

<Execution parallelTestCount="2">

Non-scaled version of the screenshot image can be found here

VS2010 with two F# unit tests running in parallel

Good luck with "native" VS/mstest F# unit testing! :)

Upvotes: 4

Related Questions