Skip to content

Parallelize additional MSTest integration suites - #55965

Merged
Evangelink merged 6 commits into
mainfrom
dev/amauryleve/parallel-integration-test-pr
Aug 28, 2026
Merged

Evangelink merged 6 commits into
mainfrom
dev/amauryleve/parallel-integration-test-pr

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Summary

  • Enable method-level parallelism for EndToEnd and ApiCompat integration tests.
  • Enable class-level parallelism for dotnet-new, Publish, and TemplateEngine IDE integration tests.
  • Isolate test asset paths, temporary roots, working directories, and one-time global initialization so parallel workers do not contend over shared state.

Validation

  • EndToEnd: 146 runnable cases passed twice; duration improved from 61 minutes to 4m13s and 3m30s.
  • ApiCompat: both net11 and net472 passed all 16 tests.
  • TemplateEngine IDE: net11 completed 138 tests (137 passed, 1 skipped); net481 completed 105 tests (104 passed, 1 skipped).
  • Publish: the full 444-test run completed with 416 passed and 26 skipped; the only two failures require unavailable ARM64 NativeAOT prerequisites. All 89 changed-class cases passed.
  • dotnet-new: the changed set completed with 76 passed and 2 skipped; the remaining prerequisite is a missing local TemplateDiscovery package.

Evangelink and others added 5 commits August 27, 2026 14:05
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 8f4a0c49-99cb-433e-96b3-e322a22f7546
Run publish test classes concurrently while preserving serial execution within each class, and isolate relative binlog output under each test asset.

Co-authored-by: Copilot App <[email protected]>
Copilot AI lite review requested due to automatic review settings August 27, 2026 12:06
@Evangelink
Evangelink requested review from a team as code owners August 27, 2026 12:06
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
2 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR increases MSTest parallel execution across several integration test suites in test/, primarily by enabling MSTest parallelization scopes (method- or class-level) and updating test infrastructure usage to avoid shared-state contention (test directories, working directories, and one-time global initialization).

Changes:

  • Enabled MSTest parallelization for EndToEnd and ApiCompat integration tests (method-level) and for dotnet-new, Publish, and TemplateEngine IDE integration tests (class-level).
  • Updated tests to use more isolated per-test/per-case asset directories and working directories to reduce collisions under parallel execution.
  • Moved/guarded some one-time/global test initialization to be safer under parallel test runners.
Show a summary per file
File Description
test/TemplateEngine/Microsoft.TemplateEngine.IDE.IntegrationTests/VerifySettingsFixture.cs Make Verify initialization effectively one-time and thread-safe.
test/TemplateEngine/Microsoft.TemplateEngine.IDE.IntegrationTests/Microsoft.TemplateEngine.IDE.IntegrationTests.csproj Enable class-level MSTest parallelization.
test/Microsoft.NET.Publish.Tests/Microsoft.NET.Publish.Tests.csproj Enable class-level MSTest parallelization with note about shared paths within a class.
test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishIncrementally.cs Set publish working directory to the test asset root for isolation.
test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASingleFileApp.cs Set publish working directory to the test asset root for isolation.
test/EndToEnd.Tests/ProjectBuildTests.cs Improve uniqueness/isolation of test directories; propagate test name into helper methods.
test/EndToEnd.Tests/GivenWindowsApp.cs Adjust test asset identifier composition to avoid collisions.
test/EndToEnd.Tests/GivenDotNetUsesMSBuild.cs Use an explicit identifier when creating test directories.
test/EndToEnd.Tests/EndToEnd.Tests.csproj Switch EndToEnd suite to method-level MSTest parallelization.
test/dotnet-new.IntegrationTests/TemplateEngineSamplesTest.cs Move .cshtml extension registration out of the test method.
test/dotnet-new.IntegrationTests/TemplateDiscoveryTool.cs Use a per-instance temp root and add cleanup.
test/dotnet-new.IntegrationTests/ModuleInitializer.cs Centralize one-time verifier initialization and .cshtml extension registration.
test/dotnet-new.IntegrationTests/DotnetNewLocaleTests.cs Remove process-wide culture mutation to reduce shared-state interference.
test/dotnet-new.IntegrationTests/DotnetNewInstallTests.cs Use a per-test temp root to avoid collisions when paths contain @.
test/dotnet-new.IntegrationTests/dotnet-new.IntegrationTests.csproj Enable class-level MSTest parallelization with fixture-sharing note.
test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.IntegrationTests/Microsoft.DotNet.ApiCompat.IntegrationTests.csproj Enable method-level MSTest parallelization.

Review details

  • Files reviewed: 16/16 changed files
  • Comments generated: 2
  • Review effort level: Lite

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 8dff6d5a-a336-47de-acb0-815997f7237b
@Evangelink
Evangelink enabled auto-merge August 27, 2026 13:36
@Evangelink

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
2 pipeline(s) were filtered out due to trigger conditions.

@Evangelink

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
2 pipeline(s) were filtered out due to trigger conditions.

@Evangelink
Evangelink merged commit a1e0b3b into main Aug 28, 2026
36 checks passed
@Evangelink
Evangelink deleted the dev/amauryleve/parallel-integration-test-pr branch August 28, 2026 02:08
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Aug 29, 2026

This branch had an error being deployed

1 failed deployment
copilot-pat-pool — 473bea69 Deployed Aug 28, 2026 by Evangelink via pre_activation #1405
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants