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

TestTfmsInParallel: false setting is not works after update to xUnit v3 #429

Open
filzrev opened this issue Dec 19, 2024 · 3 comments
Open

Comments

@filzrev
Copy link

filzrev commented Dec 19, 2024

I'm using <TestTfmsInParallel>false</TestTfmsInParallel> setting to disable parallel execution between TargetFrameworks.
But after updating to xUnit v3.
It seems not works as expected.

Reproduce steps

  1. Create xUnit v2 based project. And update packages to latest version (xUnit: 2.9.2/ xunit.runner.visualstudio: 3.0.0)
  2. Modify .csproj with following changes.
    2.1. Set <TargetFrameworks>net8.0;net9.0<TargetFrameworks>
    2.2. Set <TestTfmsInParallel>false</TestTfmsInParallel>
  3. Insert Thread.Sleep(5000) to unit test code.
  4. Run tests on Test Explorer and confirms tests is isolated between target frameworks.
  5. Modify .csproj to use xUnit v3 (<PackageReference Include="xunit.v3" Version="1.0.0" />)
  6. Run tests on Test Explorer and confirms tests is executed in parallel.

Environment
I've confirmed it can be reproduced on following environment.

  • Visual Studio 2022 Version 17.12.0 (With preview feature Use testing platform server mode enabled)
  • Visual Studio 2022 Version 17.13.0 Preview 2.0
@filzrev
Copy link
Author

filzrev commented Dec 19, 2024

I've confirmed same issue can be reproduced when using MSTest.Sdk/3.6.3.

So it this issue might be caused by Microsoft.Testing.Platform or VS Test Explorer side.
I've created issue to testfx repository microsoft/testfx#4392

@bradwilson
Copy link
Member

I agree, especially because I had no idea TestTfmsInParallel even existed before today. 😂

@filzrev
Copy link
Author

filzrev commented Dec 20, 2024

As stated on microsoft/testfx#4392 (comment) comment.
It seems be caused by VS Test Explorer side problems.

Currently it's tracked on following ticket.
https://developercommunity.visualstudio.com/t/TestTfmsInParallel:false-does-not-work-w/10817302

I'll close this issue when it's resolved on latest VS preview.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants