Repository navigation
Enable MTP crash/hang dump extensions and wire them into Helix - #55133
Merged
Merged
Conversation
Enable the Microsoft.Testing.Platform crash-dump and hang-dump extensions repo-wide for MSTest.Sdk test projects, pass them through the Helix MTP test command, ensure the dumps are uploaded, and refresh stale xUnit-mentioning comments in the Helix dispatch infrastructure. - test/Directory.Build.props: set EnableMicrosoftTestingExtensionsCrashDump and EnableMicrosoftTestingExtensionsHangDump (MSTest.Sdk manages the package versions, so no explicit pin is needed). - SDKCustomCreateTestWorkItemsWithTestExclusion.cs: hoist the shared 80%-of-timeout calculation and append --crashdump --hangdump --hangdump-timeout <T>m in the MTP branch. - test/UnitTests.proj: broaden the HelixPostCommands dump-upload globs from *hangdump.dmp to *.dmp so the MTP *_hang.dmp / *_crash.dmp are collected. - Comment-only cleanup of stale xUnit references in the dispatcher and the test-runner targets (legacy VSTest branch left intact). Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
Enables Microsoft.Testing.Platform (MTP) crash/hang dump collection for MSTest.Sdk-based test runs on Helix, and ensures resulting dump artifacts are captured and uploaded for CI diagnostics.
Changes:
- Turn on MTP CrashDump/HangDump extensions for
UsingMSTestSdk=truetest projects. - Extend the Helix MTP work-item command to pass
--crashdump --hangdump --hangdump-timeout <T>m. - Broaden Helix post-run upload globs to retain both legacy VSTest hang dumps and new MTP dump filenames; update stale comments.
Show a summary per file
| File | Description |
|---|---|
| test/UnitTests.proj | Uploads any *.dmp artifacts (covers both MTP and legacy VSTest dump naming) from Helix work items. |
| test/test-runner/TestRunner.targets | Comment updates clarifying out-of-process execution and TRX extension behavior. |
| test/test-runner/TestPublish.targets | Comment updates clarifying how MTP detection and TRX extension detection are used by the dispatcher. |
| test/HelixTasks/SDKCustomCreateTestWorkItemsWithTestExclusion.cs | Adds MTP --crashdump/--hangdump arguments and shares the timeout-derived hang timeout between MTP and VSTest branches. |
| test/Directory.Build.props | Enables CrashDump and HangDump extensions for MSTest.Sdk projects via MSBuild properties. |
Copilot's findings
- Files reviewed: 5/5 changed files
- Comments generated: 0
MSBuild rejects '--' inside XML comments; the crashdump/hangdump switch names in the explanatory comment broke evaluation of every test project. Reword to avoid the double hyphen. Co-authored-by: Copilot App <[email protected]>
Evangelink
enabled auto-merge
July 3, 2026 13:25
MichaelSimons
approved these changes
Jul 6, 2026
This was referenced Jul 7, 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.
Summary
Almost all
test/projects useMSTest.Sdkand run on Microsoft.Testing.Platform (MTP). On Helix they are dispatched via theisMTPProjectbranch ofSDKCustomCreateTestWorkItemsWithTestExclusion, which — unlike the legacy VSTest branch — had no crash/hang dump support. This made intermittent CI hangs and crashes hard to diagnose. This PR enables the MTP crash-dump and hang-dump extensions, wires them into the Helix command, ensures the dumps are uploaded, and cleans up stale xUnit-mentioning comments.Changes
1. Enable the dump extensions (
test/Directory.Build.props)EnableMicrosoftTestingExtensionsCrashDump=trueandEnableMicrosoftTestingExtensionsHangDump=truein the existingUsingMSTestSdk=='true'block. MSTest.Sdk pulls in theMicrosoft.Testing.Extensions.CrashDump/.HangDumppackages automatically and manages their versions, so no explicitPackageReferenceor version pin is required.2. Wire dumps into the Helix MTP command (
SDKCustomCreateTestWorkItemsWithTestExclusion.cs)blameHangTimeout(80% of the Helix work-item timeout) above the branch so both the MTP and legacy VSTest paths share the same calculation.--crashdump --hangdump --hangdump-timeout <T>m, whereTis the shared 80%-of-timeout value, so a hang dump is captured before Helix hard-kills the work item.--crashdumpis recognized (and silently no-ops) on the .NET Framework MTP hosts, so this is safe for the net472 rows.3. Upload both hang and crash dumps (
test/UnitTests.proj)_hang.dmp/_crash.dmp, which the old*hangdump.dmpglob missed. Broadened bothHelixPostCommandscopy globs (Windows PowerShell + POSIXfind) to*.dmp, which also still matches the legacy VSTest*hangdump.dmp. macOS crash dumps continue to work via the pre-existing ad-hoc codesign step.4. Comment cleanup (non-behavioral)
xUnit v3/ VSTest references in the dispatcher,TestRunner.targets, andTestPublish.targets. Comments that still accurately document the retained legacy VSTest branch were left intact.Validation
microsoft/testfxsource and the official docs.Notes
Microsoft.Win32.Msi.Manual.Testsor remove the VSTest branch (tracked separately in Clarify intent of Microsoft.Win32.Msi.Manual.Tests: real test project (migrate to MTP) or standalone tool (exclude from CI)? #55132)..xlfedits and no new strings.