Skip to content

Document remaining MSTest 4.3 / MTP 2.3 feature gaps#54569

Open
Evangelink wants to merge 3 commits into
dotnet:mainfrom
Evangelink:dev/amauryleve/mstest43-mtp23-docs-gaps
Open

Document remaining MSTest 4.3 / MTP 2.3 feature gaps#54569
Evangelink wants to merge 3 commits into
dotnet:mainfrom
Evangelink:dev/amauryleve/mstest43-mtp23-docs-gaps

Conversation

@Evangelink

@Evangelink Evangelink commented Jun 30, 2026

Copy link
Copy Markdown
Member

Summary

Documents the MSTest 4.3 / MTP 2.3 features that are not covered by my two other in-flight PRs, so the three together complete the 4.3/2.3 documentation:

This PR adds only the remaining gaps (11 files, no overlap in content with the above):

Analyzers

  • New reference pages for MSTEST0069 (inherited [TestClass] ignored by the source generator) and MSTEST0071 (redundant test method display name), plus their overview.md/usage-rules.md index entries.

Assertions (4.3)

  • AreSequenceEqual/AreNotSequenceEqual, AreEquivalent/AreNotEquivalent, ContainsAll/DoesNotContainAll, AreAllNotNull/AreAllDistinct/AreAllOfType, AddValueFormatter, Span<T>/Memory<T> HasCount overloads, and structured assertion messages.

Attributes / lifecycle (4.3)

  • MemberConditionAttribute, ArchitectureConditionAttribute, ExecutableConditionAttribute, class-level RetryAttribute, AssemblyFixtureProvider, and TestContext.Properties lifecycle flow.

Experimental (4.3 / 2.3)

  • Reflection source generator, ITestFilter, TestRun.Current (MSTest 4.3), and the experimental MTP extensions VideoRecorder and PackagedApp plus the Microsoft.Extensions.Logging bridge.

MTP CLI (2.3)

  • --zero-tests-policy.

Every feature records the version it was introduced in, and experimental features are flagged as experimental.

Note

Created with AI assistance.

Note

A few files (assertions, controlling-execution, lifecycle, testcontext, cli-options, analyzer indexes) are also touched by #54408/#54187 on non-overlapping lines; expect a trivial rebase once those merge.


Internal previews

Toggle expand/collapse
📄 File 🔗 Preview link
docs/core/testing/microsoft-testing-platform-cli-options.md Microsoft.Testing.Platform (MTP) CLI options reference
docs/core/testing/microsoft-testing-platform-features.md Microsoft.Testing.Platform features
docs/core/testing/mstest-analyzers/mstest0069.md [MSTEST0069: Inherited [TestClass] is ignored by the MSTest source generator](https://review.learn.microsoft.com/en-us/dotnet/core/testing/mstest-analyzers/mstest0069?branch=pr-en-us-54569)
docs/core/testing/mstest-analyzers/mstest0071.md docs/core/testing/mstest-analyzers/mstest0071
docs/core/testing/mstest-analyzers/overview.md MSTest code analysis
docs/core/testing/mstest-analyzers/usage-rules.md MSTest usage rules
docs/core/testing/unit-testing-mstest-sdk.md MSTest SDK configuration
docs/core/testing/unit-testing-mstest-writing-tests-assertions.md MSTest assertions
docs/core/testing/unit-testing-mstest-writing-tests-controlling-execution.md Test execution and control in MSTest
docs/core/testing/unit-testing-mstest-writing-tests-lifecycle.md MSTest test lifecycle
docs/core/testing/unit-testing-mstest-writing-tests-testcontext.md The TestContext class
docs/navigate/devops-testing/toc.yml docs/navigate/devops-testing/toc

Fills the documentation gaps not covered by the in-flight analyzer PR (dotnet#54187)
or feature-versions PR (dotnet#54408):

- Analyzers MSTEST0069 and MSTEST0071 reference pages and index entries.
- New 4.3 assertions: AreSequenceEqual/AreNotSequenceEqual, AreEquivalent/
  AreNotEquivalent, ContainsAll/DoesNotContainAll, AreAllNotNull/AreAllDistinct/
  AreAllOfType, AddValueFormatter, plus Span/Memory HasCount overloads and
  structured assertion messages.
- New 4.3 conditional-execution attributes (MemberCondition, ArchitectureCondition,
  ExecutableCondition), class-level RetryAttribute, AssemblyFixtureProvider, and
  TestContext.Properties lifecycle flow.
- Experimental 4.3 features (reflection source generator, ITestFilter,
  TestRun.Current) and experimental MTP extensions (VideoRecorder, PackagedApp)
  plus the Microsoft.Extensions.Logging bridge.
- MTP 2.3 --zero-tests-policy option.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 30, 2026 17:01
@dotnetrepoman dotnetrepoman Bot added this to the June 2026 milestone Jun 30, 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 completes the remaining documentation gaps for MSTest 4.3 and Microsoft.Testing.Platform (MTP) 2.3 by adding new analyzer reference pages and updating existing testing docs to cover new assertions, lifecycle/attribute features, experimental MSTest extensibility points, and the --zero-tests-policy CLI option.

Changes:

  • Added new analyzer reference pages for MSTEST0069 and MSTEST0071, and indexed them in the analyzer overview and usage lists.
  • Documented additional MSTest 4.3 features across assertions, lifecycle, execution control, and experimental extensibility (MSTest.SourceGeneration, ITestFilter, and TestRun.Current).
  • Expanded MTP 2.3 docs with logging integration, experimental extensions, and the --zero-tests-policy CLI option.
Show a summary per file
File Description
docs/core/testing/unit-testing-mstest-writing-tests-testcontext.md Documents new TestContext.Properties lifecycle flow behavior in MSTest 4.3.
docs/core/testing/unit-testing-mstest-writing-tests-lifecycle.md Adds AssemblyFixtureProvider documentation for shared assembly fixtures (MSTest 4.3).
docs/core/testing/unit-testing-mstest-writing-tests-controlling-execution.md Adds class-level RetryAttribute support and new conditional attributes (Member/Architecture/Executable) introduced in MSTest 4.3.
docs/core/testing/unit-testing-mstest-writing-tests-assertions.md Lists newly documented MSTest 4.3 assertion APIs and describes new assertion capabilities.
docs/core/testing/unit-testing-mstest-sdk.md Adds an “Experimental features” section covering source generation, filtering, and run APIs in MSTest 4.3.
docs/core/testing/mstest-analyzers/usage-rules.md Adds MSTEST0069 and MSTEST0071 to the usage rules tables and related lists.
docs/core/testing/mstest-analyzers/overview.md Adds MSTEST0069 and MSTEST0071 to the analyzer overview lists and tables.
docs/core/testing/mstest-analyzers/mstest0069.md New reference page documenting MSTEST0069 (inherited [TestClass] ignored by source generator).
docs/core/testing/mstest-analyzers/mstest0071.md New reference page documenting MSTEST0071 (redundant display name).
docs/core/testing/microsoft-testing-platform-features.md Documents the Microsoft.Extensions.Logging bridge and experimental extensions introduced in MTP 2.3.
docs/core/testing/microsoft-testing-platform-cli-options.md Adds documentation for the --zero-tests-policy option introduced in MTP 2.3.

Copilot's findings

  • Files reviewed: 11/11 changed files
  • Comments generated: 10

Comment thread docs/core/testing/mstest-analyzers/overview.md
Comment thread docs/core/testing/unit-testing-mstest-writing-tests-testcontext.md
Comment thread docs/core/testing/unit-testing-mstest-writing-tests-lifecycle.md
Comment thread docs/core/testing/unit-testing-mstest-sdk.md
Comment thread docs/core/testing/mstest-analyzers/usage-rules.md
Comment thread docs/core/testing/mstest-analyzers/overview.md
- Add MSTEST0069 and MSTEST0071 to the navigation TOC.
- Add 'ai-usage: ai-assisted' frontmatter to the updated pages.
- Use <xref:> links for MemberCondition/ArchitectureCondition/ExecutableCondition
  attributes and the TestArchitectures enum, for consistency with surrounding
  condition-attribute sections.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Evangelink Evangelink requested a review from a team as a code owner June 30, 2026 17:18
…ings

OPS validation reports 'Cross reference not found' for the new MSTest 4.3 Assert
methods and conditional-execution attributes because the 4.3 API reference isn't
published yet. Match the merged mstest0070.md precedent and use inline code
instead of <xref:> for these APIs; the new methods remain documented in the
'New in MSTest 4.3' assertions section. Cross-references can be reinstated once
the 4.3 API reference ships.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Evangelink Evangelink enabled auto-merge (squash) June 30, 2026 17:33
@Evangelink

Copy link
Copy Markdown
Member Author

@gewarren please review

ai-usage: ai-assisted
dev_langs:
- CSharp
- VB

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- VB

There's no VB code example, so remove this.


## Cause

A test method sets a `DisplayName` (on `[TestMethod]` or `[DataRow]`) to a value that's identical to the test method name.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to use xrefs here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants