-
Notifications
You must be signed in to change notification settings - Fork 80
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
The [Collection] attribute is ignored when running unit tests from contextual menu in the "code view". #421
Comments
Can you provide a repro project? I'm not able to repro this (it passes in both scenarios). Please include the version of Visual Studio you're using and the results of running Thanks! |
@bradwilson, I created a repo with a project to reproduce the bug: https://github.com/GillesTourreau/visualstudio.xunit-ParallelExecutionVsRunnerBug An other scenario to reproduce the error:
Also, you can increase the value of the About my CPU, I have a 12th Gen Intel(R) Core(TM) i9-12900H 2.50 GHz (14 Cores, 20 logical processors recognized by Windows). I use the last VS version (17.11.5).
|
To reproduce the bug, I have created the following unit tests class which contains 4 unit tests that must not be executed in parallel, for that I added the
[Collection("Foobar")]
attribute on the unit test class.I added in this unit test class some assertions to check that unit tests are not executed in parallel.
When I run the unit tests from the Test Explorer, we can see that all the unit tests are executed sequentially.
But when I run the unit tests from the code with the contextual menu (when right click on empty code line between two unit test methods), the unit tests are executed in parallel:
The text was updated successfully, but these errors were encountered: