Skip to content

Document dotnet test whole-run zero-tests verdict and global/per-module --minimum-expected-tests (.NET 11 SDK) #55011

Description

@Evangelink

Summary

dotnet test (Microsoft.Testing.Platform path) gained a whole-run "zero tests ran" verdict with a global vs. per-module minimum-expected-tests model. This isn''t documented on Learn yet.

Implemented in microsoft/testfx#7457 via testfx PR microsoft/testfx#9709 (per-module signal) and SDK PR dotnet/sdk#55362 (whole-run aggregation). Available starting with the .NET 11 SDK (11.0.1xx) (merged for 11.0-preview7); not available in .NET 10 or earlier.

Behavior to document

  • Arguments before -- are global / whole-run (interpreted by the dotnet test orchestrator); arguments after -- are local / per-module (forwarded to each test module). Example:
    dotnet test --minimum-expected-tests 5 -- --minimum-expected-tests 2
    
    = at least 5 tests across the whole run and at least 2 tests per module.
  • A module that matches no tests (e.g. under --test-modules or a global --filter) exits 8 (ZeroTests) but is normalized to success before aggregation; the whole-run zero-tests verdict is decided once from the total test count, so one empty module no longer fails the whole run. The empty module keeps its Exit code: 8 diagnostic for visibility.
  • An explicit --minimum-expected-tests N that isn''t met yields 9 (MinimumExpectedTestsPolicyViolation), kept distinct from 8 so a stricter (global or per-module) minimum isn''t confused with an empty module.

Pages likely affected

  • dotnet test command reference (MTP options, argument-split semantics).
  • Microsoft.Testing.Platform exit codes table (clarify 8 vs 9 and the per-module vs whole-run distinction).

Notes

  • --minimum-expected-tests 0 is intentionally not an alias for --ignore-exit-code 8; use --ignore-exit-code 8 to suppress the zero-tests code.

Filed to track the Learn documentation for a feature that has already shipped in the product.


Associated WorkItem - 632181

Activity

  1. self-assigned this
    on Sep 3, 2026
  2. added
    🗺️ mapQUESTOnly used as a way to mark an issue as updated for quest. RepoMan should instantly remove it.
    on Sep 8, 2026
  3. removed
    🗺️ mapQUESTOnly used as a way to mark an issue as updated for quest. RepoMan should instantly remove it.
    on Sep 8, 2026
  4. added
    🗺️ reQUESTTriggers an issue to be imported into Quest.
    and removed on Sep 8, 2026
  5. added
    📌 seQUESTeredIdentifies that an issue has been imported into Quest.
    and removed
    🗺️ reQUESTTriggers an issue to be imported into Quest.
    on Sep 9, 2026
  6. moved this from 🔖 Ready to 🏗 In progress in dotnet/docs September 2026 sprint projecton Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

📌 seQUESTeredIdentifies that an issue has been imported into Quest.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions