IMPORTANT: if the defect is reproduced only in a workflow from within the Visual Studio IDE then do not report the issue here - instead, please report it using Visual Studio's "Send Feedback" option that can be accessed from the Help menu OR using this link https://developercommunity.visualstudio.com.
For a defect specific to the MSTest V2 test framework, describe the issue you've observed.
What steps can reproduce the defect?
Please share the setup, sample project, target platform (desktop, core, uap)
N/A
Share the expected output
N/A
What is the behavior observed?
N/A
Please share additional details about the test environment.
Operating system, Build version of vstest.console, Package version of MSTest
framework and adapter
N/A
This is a feature request.
Right now (at least from what I've seen documented), this is the recommended way to include a number of workers for IAP.
[assembly: Microsoft.VisualStudio.TestTools.UnitTesting.Parallelize(Workers = 8, Scope = Microsoft.VisualStudio.TestTools.UnitTesting.ExecutionScope.MethodLevel)]
However, it would be good to know if there is a way to specify Workers = MAX_AVAILABLE. We run our tests on different environments (dev, CI, etc.) and they have different number of cores.
If this is already possible, it should be documented somewhere.
Thanks!
Joe
@singhsarab I'm wondering if this is something that could be achieved through the .runsettings file?
If so, what do you think of something like this:
<RunConfiguration>
<Parallelize>
<UseMaxNumberOfWorkers>true</UseMaxNumberOfWorkers> <!-- to use all the available cores -->
<NumberOfWorkers>4</NumberOfWorkers> <!-- optional if above tag is set -->
</Parallelize>
</RunConfiguration>
let me know your thoughts, and if i'm in the right path. I'll be willing to work on it ;)
@parrainc
Revisiting this.
It seems like a good idea.
We could also possibly set to 0 like MaxCPUCount set in the RunConfiguration.
Sounds good to me. I'll be working on it to have a PR created soon
Most helpful comment
@parrainc
Revisiting this.
It seems like a good idea.
We could also possibly set to 0 like MaxCPUCount set in the RunConfiguration.