Sync dotnet test (VSTest) docs with microsoft/vstest July 2026 updates#54835
Draft
azat-msft wants to merge 8 commits into
Draft
Sync dotnet test (VSTest) docs with microsoft/vstest July 2026 updates#54835azat-msft wants to merge 8 commits into
azat-msft wants to merge 8 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4e840b63-ad95-40c2-9ef8-5f2fcc4cfdaa
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4e840b63-ad95-40c2-9ef8-5f2fcc4cfdaa
Fold complementary changes from #2 into this PR: --diag tracelevel sub-option, TestRunParameters command-line support with RunSettings precedence, corrected filter property table (xUnit Traits, NUnit TestCategory/Category/Property) with a trait/property mapping note, and the RunSettingsArguments repo link fix. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c46887ab-e194-4295-9afd-01a25c405c76
Per the propagation plan across the July 13-19 microsoft/vstest docs commits: - Exit codes: add 0/1 contract, no-tests warning behavior, and TreatNoTestsAsError to dotnet-test-vstest.md (copy). - Blame: add option->switch->runsettings mapping tables plus the MTP equivalent to dotnet-test-vstest.md (combination; links vstest for the full reference). - Filter shell escaping: add shell-quoting/PowerShell-comma guidance to selective-unit-tests.md (copy). - CLI selective: update --Platform architecture values in dotnet-vstest.md (x86/x64/ARM/ARM64/S390x/Ppc64le/RiscV64/LoongArch64). Replace both remaining archived Microsoft/vstest-docs filter.md links with microsoft/vstest (verified filter.md exists and covers TestCase filtering). Bump ms.date and add ai-usage disclosure. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c46887ab-e194-4295-9afd-01a25c405c76
- Add the missing user-facing options --Collect and -e|--Environment (both are forwarded to vstest.console and documented in vstest's main CLI reference). - Remove --Port and --ParentProcessId, which vstest classifies as editor/IDE (design-mode) integration options not intended for direct shell use. - Fix Synopsis formatting for --Platform and --ResultsDirectory, and note that options are forwarded to vstest.console with a link to the full commandline.md reference. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c46887ab-e194-4295-9afd-01a25c405c76
Annotate the Learn and microsoft/vstest command-line option links so a reader can tell which to use: Learn for stable curated docs, the vstest repo for the most current/source-derived details. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c46887ab-e194-4295-9afd-01a25c405c76
Link microsoft/vstest docs/environment-variables.md from the See also section of dotnet-test-vstest.md and dotnet-vstest.md so readers can find the full VSTest env-var reference (including the VSTEST_DOTNET_ROOT_* variables the SDK sets when launching vstest.console). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c46887ab-e194-4295-9afd-01a25c405c76
Contributor
There was a problem hiding this comment.
Pull request overview
This PR syncs and enriches the .NET CLI VSTest documentation with upstream updates from microsoft/vstest (July 2026), expanding option coverage, correcting filtering guidance, and adding cross-references to upstream reference docs.
Changes:
- Updates
dotnet vstestdocs to reflect current forwarded options (for example,--Collect,--Environment), remove IDE/design-mode-only options, and add upstream reference links. - Expands
dotnet test(VSTest runner) docs with blame switch↔runsettings mappings, diagnosticstracelevelguidance, and an exit code contract section. - Enhances selective test filtering docs with character-escaping guidance, additional framework properties, and shell-escaping notes.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| docs/core/tools/dotnet-vstest.md | Updates dotnet vstest option coverage, synopsis, and cross-references to upstream CLI and env-var docs. |
| docs/core/tools/dotnet-test-vstest.md | Adds blame/runsettings mapping tables, diagnostics details, exit codes behavior, and upstream reference links. |
| docs/core/testing/selective-unit-tests.md | Adds filter escaping table, framework property updates, and shell-escaping guidance, plus updated upstream links. |
| [--Port <PORT>] [--ResultsDirectory<PATH>] [--Settings <SETTINGS_FILE>] | ||
| [--TestAdapterPath <PATH>] [--TestCaseFilter <EXPRESSION>] | ||
| [--Tests <TEST_NAMES>] [[--] <args>...] | ||
| [--Platform <PLATFORM_TYPE>] [--ResultsDirectory <PATH>] |
| | --- | --- | --- | | ||
| | Collect a crash dump | `--blame-crash` | `<CollectDump />` | | ||
| | Collect even on a clean exit | `--blame-crash-collect-always` | `<CollectDump CollectAlways="true" />` | | ||
| | Dump type (`mini`, `full`; default `full`) | `--blame-crash-dump-type` | `<CollectDump DumpType="full" />` | |
| | --- | --- | --- | | ||
| | Collect a hang dump | `--blame-hang` | `<CollectDumpOnTestSessionHang />` | | ||
| | Timeout before the hang dump (default `1h`) | `--blame-hang-timeout` | `<CollectDumpOnTestSessionHang TestTimeout="90m" />` | | ||
| | Hang dump type (`mini`, `full`, `none`) | `--blame-hang-dump-type` | `<CollectDumpOnTestSessionHang HangDumpType="mini" />` | |
dotnet-vstest.md: use the standard NAME/VALUE placeholder form for --Environment; align --ResultsDirectory to the space form used by the synopsis and other options. dotnet-test-vstest.md: reword to 'The .runsettings file'; lowercase the blame example dump-type values to match the mapping tables and switch values; 'Enables a data collector'; use the space-form --diag in the tracelevel example. selective-unit-tests.md: capitalize NUnit. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c46887ab-e194-4295-9afd-01a25c405c76
Member
Author
|
Thanks for the review. All eight comments are addressed in the latest commit:
|
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
Enriches and cross-references the VSTest command-line documentation against the microsoft/vstest
/docsdirectory, propagating the documentation updates made upstream between July 13–19, 2026. Changes touch three articles:docs/core/tools/dotnet-test-vstest.md(dotnet testwith the VSTest runner)docs/core/tools/dotnet-vstest.md(dotnet vstest)docs/core/testing/selective-unit-tests.md(filter reference)dotnet-test-vstest.mddotnet testswitch →.runsettingselement mapping tables, plus the Microsoft.Testing.Platform (MTP) equivalent (--crashdump/--hangdump), linking the vstest blame collector doc for the full reference.0/1contract, the "no tests found" warning that still returns0, andRunConfiguration.TreatNoTestsAsError.--diag tracelevel,TestRunParameters+ RunSettings precedence, and filter property-table corrections (xUnitTraits; NUnitTestCategory/Category/Property) with a trait/property mapping note.dotnet-vstest.md--Collectand-e|--Environment(both forwarded tovstest.consoleand present in vstest's main CLI reference).--Portand--ParentProcessId, which vstest classifies as editor/IDE (design-mode) integration options not intended for direct shell use.--Platformarchitecture values (x86,x64,ARM,ARM64,S390x,Ppc64le,RiscV64,LoongArch64) and fixed Synopsis formatting.commandline.mdand environment-variables references, with short descriptors distinguishing the Learn (stable/curated) and repo (source-derived/latest) docs.selective-unit-tests.mdFilterHelper.EscapeAPI note.Category/Propertyto the NUnit filter properties (kept consistent withdotnet-test-vstest.md).Archived-link fixes
Replaced all remaining archived
Microsoft/vstest-docslinks with theirmicrosoft/vstestequivalents (verified the target files exist and cover the relevant content).Content source breakdown
extensions/blame-datacollector.mdTreatNoTestsAsErrorcommandline.mdfilter.mdTraitsfilter.md--diag tracelevel,TestRunParameters, precedencediagnose.md,RunSettingsArguments.md--Collect,-e/--Environment,--Platformvalues, omit/Port/ParentProcessIdcommandline.mdandsrc/vstest.console/ProcessorsMicrosoft/vstest-docs→microsoft/vstestNote
This PR was created with the assistance of AI (
ai-usage: ai-assisted, present in the affected articles). Sections adapted from upstream were mapped 1:1 to the source and verified; please review for editorial consistency.Fixes # (n/a)
Internal previews