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 is not works when running tests on TestExplorer with Microsoft.Testing.Platform mode #4392

Closed
filzrev opened this issue Dec 19, 2024 · 2 comments
Labels
Area: Testing Platform Belongs to the Microsoft.Testing.Platform core library External: Test Explorer

Comments

@filzrev
Copy link

filzrev commented Dec 19, 2024

Describe the bug

I'm using <TestTfmsInParallel>false</TestTfmsInParallel> setting to disable parallel execution between TargetFrameworks.

But when running tests on Visual Studio Test Explorer with Microsoft.Testing.Platform mode.
It not works as expected.

Steps To Reproduce

  1. Create test project with dotnet new mstest --sdk --test-runner MSTest
  2. Modify csproj file with following changes
    2.1 Set target frameworks to <TargetFrameworks>net8.0;net9.0</TargetFrameworks>
    2.2. Set <TestTfmsInParallel>false</TestTfmsInParallel>
  3. Add Thread.Sleep(5000); code to test method.
  4. Open Visual Studio and build project.
  5. Run test with Test Explorer. And confirm test is executed in parallel.

Expected behavior

Tests are executed in sequential orders.

Actual behavior

Tests are executed in parallel between targe frameworks.

Tested environment

  • Visual Studio 2022 Version 17.12.0
    (With preview feature Use testing platform server mode to use Microsoft.Testing.Platform)

Additional context

When tests are executed with <UseVSTest>true</UseVSTest>. It works as expected.

@campersau
Copy link

I have the same issue. I always need to switch the TargetFramework manually in the csproj so there is only one when using test explorer...

@Evangelink Evangelink added Area: Testing Platform Belongs to the Microsoft.Testing.Platform core library External: Test Explorer and removed Needs: Triage 🔍 labels Dec 20, 2024
@Evangelink
Copy link
Member

Hi!

Thanks for raising this. I was not aware of the existance of this property!

It looks like this is an issue on Test Explorer side so I have created a ticket on Developer community (https://developercommunity.visualstudio.com/t/TestTfmsInParallel:false-does-not-work-w/10817302). I'll move ahead and close this one.

@Evangelink Evangelink closed this as not planned Won't fix, can't repro, duplicate, stale Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Testing Platform Belongs to the Microsoft.Testing.Platform core library External: Test Explorer
Projects
None yet
Development

No branches or pull requests

3 participants