Fix Helix tests not running after xUnit v3 migration#53757
Closed
MichaelSimons wants to merge 1 commit intodotnet:mainfrom
Closed
Fix Helix tests not running after xUnit v3 migration#53757MichaelSimons wants to merge 1 commit intodotnet:mainfrom
MichaelSimons wants to merge 1 commit intodotnet:mainfrom
Conversation
After the xUnit v2 to v3 migration (dotnet#52930), all Helix work items fail with 'No test is available in {assembly}.dll' because 'dotnet test' relies on VSTest discovery which cannot find the xUnit v3 adapter on Helix agents. Switch from 'dotnet test' to 'dotnet exec' to run xUnit v3 tests as self-hosting executables, matching the approach used by the Arcade Helix SDK's CreateXUnitV3WorkItems task. Changes: - SDKCustomCreateXUnitWorkItemsWithTestExclusion.cs: Replace 'dotnet test' with 'dotnet exec --roll-forward Major --runtimeconfig/--depsfile'. Replace VSTest options (--logger trx, --blame-hang, --filter) with xUnit v3 native options (-xml testResults.xml, -noAutoReporters, -class). Convert env var pass-through from 'dotnet test -e' to shell export/set commands. - AssemblyScheduler.cs: Remove trailing '.' from class names in partition filter string. The dot was needed for VSTest FullyQualifiedName contains-matching but xUnit v3's native -class filter uses exact match (with optional wildcards).
This was referenced Apr 8, 2026
Open
1 task
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
After the xUnit v2 to v3 migration (#52930), all Helix work items fail with:
This means zero tests are actually executing on Helix. The ~2k tests visible on the PR Tests tab come from non-Helix sources (FullFramework/AoT legs), down from ~71k tests pre-migration (e.g. PR #53613).
Root Cause
dotnet test {assembly}.dllrelies on VSTest discovery to find tests. With xUnit v3, the VSTest adapter (xunit.v3.runner.visualstudio) is not resolvable by the test host on Helix agents — only the SDK's built-in Extensions directory is searched, and the xUnit v3 adapter is not there. The diagnostic log confirms"TestDiscoverers":[]and"ExecutedTests":0.Fix
Switch from
dotnet testtodotnet execto run xUnit v3 tests as self-hosting executables, matching the approach used by the Arcade Helix SDK'sCreateXUnitV3WorkItemstask.Changes
SDKCustomCreateXUnitWorkItemsWithTestExclusion.csdotnet testwithdotnet exec --roll-forward Major. Replace VSTest options (--logger trx,--blame-hang,--filter) with xUnit v3 native options (-xml testResults.xml,-noAutoReporters,-class). Convert env var pass-through from-eto shellexport/set.AssemblyScheduler.cs.from class names in partition filter string. The dot was needed for VSTestFullyQualifiedNamecontains-matching; xUnit v3's native-classfilter uses exact match.Before (broken)
After (fixed)
Verification
Confirmed via Helix API console logs from PR #53680 (post-xUnit v3) that every work item produces
No test is availableandExecutedTests: 0.