The Wayback Machine - https://web.archive.org/web/20201228062454/https://github.com/microsoft/testfx/issues/559
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
josephliccini opened this issue Jan 31, 2019 · 3 comments

Comments

@josephliccini
Copy link

@josephliccini josephliccini commented Jan 31, 2019

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

@parrainc
Copy link
Contributor

@parrainc parrainc commented Mar 5, 2019

@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 ;)

@singhsarab
Copy link
Member

@singhsarab singhsarab commented Jan 6, 2020

@parrainc
Revisiting this.
It seems like a good idea.
We could also possibly set to 0 like MaxCPUCount set in the RunConfiguration.

@parrainc
Copy link
Contributor

@parrainc parrainc commented Jan 9, 2020

Sounds good to me. I'll be working on it to have a PR created soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.