Update test-running agent instructions for MTP+xUnit v3 - #13806
#13806Merged
rainersigwald merged 3 commits intoMay 19, 2026
maindotnet/msbuild:mainfrom
rainersigwald/test-flakiness-checkdotnet/msbuild:rainersigwald/test-flakiness-checkCopy head branch name to clipboard
Merged
Update test-running agent instructions for MTP+xUnit v3#13806rainersigwald merged 3 commits intomaindotnet/msbuild:mainfrom rainersigwald/test-flakiness-checkdotnet/msbuild:rainersigwald/test-flakiness-checkCopy head branch name to clipboard
rainersigwald merged 3 commits into
maindotnet/msbuild:mainfrom
rainersigwald/test-flakiness-checkdotnet/msbuild:rainersigwald/test-flakiness-checkCopy head branch name to clipboard
Conversation
dotnet test --filter ... silently fails against this repo's MTP-using test projects (Unknown option --filter, Zero tests ran, exit 5). Replace the broken examples with the working -- --filter-method form, and call out the gotcha in AGENTS.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
🔍 Skill Validator Results✅ All checks passed
Summary
Full validator output```text Found 1 skill(s) [running-unit-tests] 📊 running-unit-tests: 2,386 BPE tokens [chars/4: 2,317] (detailed ✓), 10 sections, 6 code blocks ✅ All checks passed (1 skill(s)) ``` |
Several references conflated 'Microsoft.Testing.Platform' (the host) with 'xUnit v3 MTP runner' (the framework that provides --filter-method/--filter-class/--filter-trait and xUnit.* settings). Clarify which flags come from which layer so a future reader looking up MTP docs doesn't get confused about why --filter-method isn't there. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rainersigwald
marked this pull request as ready for review
May 18, 2026 20:30
rainersigwald
enabled auto-merge (squash)
May 18, 2026 20:30
Contributor
There was a problem hiding this comment.
Pull request overview
Updates repo agent/test-running documentation to reflect the xUnit v3 + Microsoft.Testing.Platform (MTP) migration (PR #13482), specifically the correct way to filter a single test when using dotnet test.
Changes:
- Update AGENTS.md to use xUnit v3 native filtering via
dotnet test ... -- --filter-method "*...*"instead of--filter .... - Update the
running-unit-testsskill to explicitly call out that--filteris not applicable here and to standardize examples on-- --filter-method "*...*".
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| AGENTS.md | Replaces stale single-test filtering guidance with xUnit v3/MTP-compatible -- --filter-method usage. |
| .github/skills/running-unit-tests/SKILL.md | Aligns filtering/pitfalls section and examples with xUnit v3 MTP runner filtering flags. |
ViktorHofer
approved these changes
May 19, 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.
I've watched agents struggle to run tests, and I think it's because #13482 made it so some of the stuff in our agent instructions was stale.
With this change both
gpt-5.3-codexandclaude-haiku-4.5seemed to get the--filter-methodsyntax right in one shot when asked to run a unit test.