Can Visual Studio 2012 run unit tests in parallel?
Asked Answered
L

4

15

Can Visual Studio 2012 run unit tests in parallel? Visual Studio 2010 has an option to do this:

http://blogs.msdn.com/b/vstsqualitytools/archive/2009/12/01/executing-unit-tests-in-parallel-on-a-multi-cpu-core-machine.aspx

...but I can't find anything similar in Visual Studio 2012. I tried the procedure described in the referenced article, but even loading the same test settings file I was unable to run tests in parallel.

Lemcke answered 1/10, 2012 at 13:49 Comment(0)
H
14

No. VS2012 unit test framework currently does not run tests in parallel.

Edit: Moving a part of the comments with Dave into the answer for better reference.

See this link on how to enable parallel runs using the .testsettings. Once you have this configured in your .testsettings file you can then set that as the active settings file in VS and this which will force the execution in the legacy mstest framework, where this feature is available.

Haywire answered 8/11, 2012 at 13:36 Comment(4)
Do you have any idea what the timeline for this is? Where did you get this information? Thanks.Antechamber
I am from the product team owning this feature. I don't have a date to share for this feature.Haywire
@allen, I'm confused. According to the link presented above (blogs.msdn.com/b/vstsqualitytools/archive/2009/12/01/…) these options were introduced in VS2010. Are you saying that these have been removed from VS2012?Fluctuant
@DaveBlack those features are wrt the mstes framework which is the default test framework pre VS2012. There you still have the ability to run tests in paralle using the .testsettings file as pointed out in the blog. There is no equivalent in the vstest framework introduced in VS2012.Haywire
J
4

You can force VS2012 to use the 2010 test settings file. You can add FileName.testsettings into the 2012 .runsettings file. This is considered legacy and probably won't be supported forever.

e.g.

<MSTest>
 <CaptureTraceOutput>True</CaptureTraceOutput>
 <DeploymentEnabled>False</DeploymentEnabled>
 <SettingsFile>FILENAME.testsettings</SettingsFile>
 <ForcedLegacyMode>True</ForcedLegacyMode>
</MSTest>
Junkie answered 6/8, 2013 at 20:42 Comment(0)
A
2

I have a test project upgraded from 2010 to 2012. It won't run in parallel in the IDE, but using mstest.exe with the test DLL works fine.

Appointed answered 21/2, 2013 at 22:42 Comment(0)
E
1

Visual Studio 2012 doesn't allow to run tests in parallel.

But you can try ParallelTestRunner tool to run Visual Studio 2012/2013/2015 tests in parallel from the command line.

Exurbanite answered 15/7, 2015 at 12:9 Comment(2)
We do prefer that answers be specifically crafted to respond to the particular question asked. Several members of the community flagged your other duplicate answers as being slightly excessive in promoting this particular repository. These have been removed for now, but perhaps you could edit those to explain why this project solves the particular questions you answered.Obtuse
I have edited my post stackoverflow.com/posts/31430701/edit for this question #3917560. Can it be reviewed?Exurbanite

© 2022 - 2024 — McMap. All rights reserved.