Testfx: [Feature Request] For IAP, allow and/or document a way to use max available workers the device supports

Created on 31 Jan 2019  路  3Comments  路  Source: microsoft/testfx

Description

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.

Steps to reproduce

What steps can reproduce the defect?
Please share the setup, sample project, target platform (desktop, core, uap)
N/A

Expected behavior

Share the expected output
N/A

Actual behavior

What is the behavior observed?
N/A

Environment

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

enhancement up-for-grabs

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.

All 3 comments

@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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JVimes picture JVimes  路  5Comments

jimontheriver picture jimontheriver  路  5Comments

jayaranigarg picture jayaranigarg  路  6Comments

elv1s42 picture elv1s42  路  3Comments

MikeChristensen picture MikeChristensen  路  6Comments