Change integration test parallelization from ClassLevel to MethodLevel#15526
Merged
nohwnd merged 2 commits intomicrosoft:mainfrom Mar 20, 2026
Merged
Change integration test parallelization from ClassLevel to MethodLevel#15526nohwnd merged 2 commits intomicrosoft:mainfrom
nohwnd merged 2 commits intomicrosoft:mainfrom
Conversation
Integration tests offload work to child processes (vstest.console, testhost), so there is no shared in-process state between methods. MethodLevel parallelization allows more tests to run concurrently, improving overall test execution time. Fixes microsoft#15488 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Switches MSTest integration/acceptance test parallelization from class-level to method-level to increase concurrency and reduce overall test runtime, based on the fact that most work is executed in child processes.
Changes:
- Updated MSTest assembly-level
Parallelizescope fromClassLeveltoMethodLevelin two integration test assemblies. - Expanded comments to document why method-level parallelization is considered safe (child-process isolation).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test/Microsoft.TestPlatform.Library.IntegrationTests/Properties/AssemblyInfo.cs | Changes MSTest parallelization scope to MethodLevel and documents rationale. |
| test/Microsoft.TestPlatform.Acceptance.IntegrationTests/Properties/AssemblyInfo.cs | Same parallelization scope change for acceptance integration tests. |
Blame tests collect crash/hang dumps from child processes and race when run in parallel at method level, causing dump files to be missed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
nohwnd
commented
Mar 20, 2026
|
|
||
| [TestClass] | ||
| [TestCategory("Windows-Review")] | ||
| [DoNotParallelize] // Blame tests collect crash/hang dumps from child processes and race when run in parallel. |
Evangelink
approved these changes
Mar 20, 2026
This was referenced Mar 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integration tests offload work to child processes (vstest.console, testhost), so there is no shared in-process state between test methods in the same class. ClassLevel parallelization was unnecessarily conservative - switching to MethodLevel allows more tests to run concurrently, improving overall test execution time.
Each test method creates its own TempDirectory and invokes vstest.console independently, so concurrent execution within a class is safe.
Fixes #15488