we have moved from VS2010 to VS2013 environment. Our solution has over 5K unit tests and on VS2010 they took about 5 minutes while on VS2013 they are taking about 20 minutes.
We saw that there is an issue using the testsettings
file as it configures VS2013 to use the former test framework so we moved it to a runsettings
file which in facts solves some problems we had on the transition.
The main think right now is that we cannot find how to configure VS2013 to execute the tests in parallel. On the former VS we had the <Execution parallelTestCount="0">
setting which seems to be non available on the runsettings
file.
Summarizing, how can we run tests in parallel using a runsettings
file so we use the newer framework?
Thanks.
Visual Studio 2019 runs unit tests sequentially when it is suppose to run them in parallel. Click on the Run Tests in Parallel button in Test Explorer. Make sure the icon is highlighted. Run unit tests.
Manually select the run settings fileIn the IDE, select Test > Configure Run Settings > Select Solution Wide runsettings File, and then select the . runsettings file. This file overrides the . runsettings file at the root of the solution, if one is present, and is applied across all tests run.
You can enable this in runsettings by adding <Format>Cobertura</Format> or <Format>Xml</Format> in the DataCollector configuration section in your runsettings file. This format can be viewed in the code coverage results window in Visual Studio Enterprise.
Scope : Determine if the runner must parallelize tests at the method or class level. MethodLevel will run all tests in parallel. ClassLevel will run all test classes in parallel, but tests in a class are run sequentially. You should use ClassLevel if the tests within classes have interdependencies.
You use ?
You can force VS2013 to use the 2010-2013 test settings file. You can add FileName.testsettings into the 2013 .runsettings file.
<MSTest>
<CaptureTraceOutput>True</CaptureTraceOutput>
<DeploymentEnabled>false</DeploymentEnabled>
<SettingsFile>FILENAME.testsettings</SettingsFile>
<ForcedLegacyMode>True</ForcedLegacyMode>
</MSTest>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With