Skip to content

Sync dotnet test (VSTest) docs with microsoft/vstest July 2026 updates#54835

Draft
azat-msft wants to merge 8 commits into
dotnet:mainfrom
azat-msft:vstest-docs-enrichment
Draft

Sync dotnet test (VSTest) docs with microsoft/vstest July 2026 updates#54835
azat-msft wants to merge 8 commits into
dotnet:mainfrom
azat-msft:vstest-docs-enrichment

Conversation

@azat-msft

@azat-msft azat-msft commented Jul 19, 2026

Copy link
Copy Markdown
Member

Summary

Enriches and cross-references the VSTest command-line documentation against the microsoft/vstest /docs directory, propagating the documentation updates made upstream between July 13–19, 2026. Changes touch three articles:

  • docs/core/tools/dotnet-test-vstest.md (dotnet test with the VSTest runner)
  • docs/core/tools/dotnet-vstest.md (dotnet vstest)
  • docs/core/testing/selective-unit-tests.md (filter reference)

dotnet-test-vstest.md

  • Blame: added crash/hang-dump option → dotnet test switch → .runsettings element mapping tables, plus the Microsoft.Testing.Platform (MTP) equivalent (--crashdump/--hangdump), linking the vstest blame collector doc for the full reference.
  • Exit codes: new section documenting the 0/1 contract, the "no tests found" warning that still returns 0, and RunConfiguration.TreatNoTestsAsError.
  • Env-vars reference link, --diag tracelevel, TestRunParameters + RunSettings precedence, and filter property-table corrections (xUnit Traits; NUnit TestCategory/Category/Property) with a trait/property mapping note.
  • Added a See also link to the VSTest environment-variables reference.

dotnet-vstest.md

  • Added the missing user-facing options --Collect and -e|--Environment (both forwarded to vstest.console and present in vstest's main CLI reference).
  • Removed --Port and --ParentProcessId, which vstest classifies as editor/IDE (design-mode) integration options not intended for direct shell use.
  • Corrected the --Platform architecture values (x86, x64, ARM, ARM64, S390x, Ppc64le, RiscV64, LoongArch64) and fixed Synopsis formatting.
  • Added See also links to the vstest commandline.md and environment-variables references, with short descriptors distinguishing the Learn (stable/curated) and repo (source-derived/latest) docs.

selective-unit-tests.md

  • Added the filter character-escaping table and the FilterHelper.Escape API note.
  • Added Category/Property to the NUnit filter properties (kept consistent with dotnet-test-vstest.md).
  • Added shell-escaping guidance, including the PowerShell comma-as-array-operator caveat.

Archived-link fixes

Replaced all remaining archived Microsoft/vstest-docs links with their microsoft/vstest equivalents (verified the target files exist and cover the relevant content).

Content source breakdown

Change microsoft/vstest source Type
Blame option/switch/runsettings mapping + MTP note extensions/blame-datacollector.md Adapted
Exit codes + TreatNoTestsAsError commandline.md Adapted
Filter shell/character escaping filter.md Adapted
NUnit filter properties, xUnit Traits filter.md Adapted
--diag tracelevel, TestRunParameters, precedence diagnose.md, RunSettingsArguments.md Adapted
--Collect, -e/--Environment, --Platform values, omit /Port /ParentProcessId commandline.md and src/vstest.console/Processors Adapted / verified against source
Archived-link replacements repo move Microsoft/vstest-docsmicrosoft/vstest Fixed

Note

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

📄 File 🔗 Preview link
docs/core/testing/selective-unit-tests.md Run selected unit tests
docs/core/tools/dotnet-test-vstest.md dotnet test command with VSTest
docs/core/tools/dotnet-vstest.md dotnet vstest

azat-msft and others added 7 commits July 13, 2026 16:30
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
Copilot AI review requested due to automatic review settings July 19, 2026 21:57
@dotnetrepoman dotnetrepoman Bot added this to the July 2026 milestone Jul 19, 2026
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates PR is created by someone from the .NET community. label Jul 19, 2026

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 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 vstest docs 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, diagnostics tracelevel guidance, 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>]
Comment thread docs/core/tools/dotnet-vstest.md Outdated
Comment thread docs/core/tools/dotnet-vstest.md Outdated
Comment thread docs/core/tools/dotnet-test-vstest.md Outdated
| --- | --- | --- |
| 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" />` |
Comment thread docs/core/tools/dotnet-test-vstest.md Outdated
Comment thread docs/core/tools/dotnet-test-vstest.md Outdated
Comment thread docs/core/testing/selective-unit-tests.md Outdated
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
@azat-msft

Copy link
Copy Markdown
Member Author

Thanks for the review. All eight comments are addressed in the latest commit:

  • --Environment placeholder (synopsis + option heading): switched to the standard <NAME="VALUE"> form used by dotnet test.
  • --ResultsDirectory synopsis/body mismatch: aligned the option to the space form (--ResultsDirectory <PATH>) so it matches the synopsis and every other option in the article.
  • "Runsettings configuration" phrasing: reworded to "The .runsettings file …".
  • Blame .runsettings example casing: lowercased DumpType/HangDumpType values (full) so the example matches the mapping tables and the --blame-*-dump-type switch values.
  • "Enables data collector": now "Enables a data collector".
  • --diag:log.txt tracelevel example: changed to the space form --diag log.txt;tracelevel=verbose to match the -d|--diag <LOG_FILE> syntax.
  • "Nunit" casing: corrected to "NUnit".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates PR is created by someone from the .NET community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants