Document remaining MSTest 4.3 / MTP 2.3 feature gaps#54569
Open
Evangelink wants to merge 3 commits into
Open
Conversation
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>
Contributor
There was a problem hiding this comment.
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, andTestRun.Current). - Expanded MTP 2.3 docs with logging integration, experimental extensions, and the
--zero-tests-policyCLI 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
- 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>
…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>
Member
Author
|
@gewarren please review |
gewarren
reviewed
Jun 30, 2026
| ai-usage: ai-assisted | ||
| dev_langs: | ||
| - CSharp | ||
| - VB |
Collaborator
There was a problem hiding this comment.
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. |
Collaborator
There was a problem hiding this comment.
It would be nice to use xrefs here.
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
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:
--progress, etc.)This PR adds only the remaining gaps (11 files, no overlap in content with the above):
Analyzers
[TestClass]ignored by the source generator) and MSTEST0071 (redundant test method display name), plus theiroverview.md/usage-rules.mdindex entries.Assertions (4.3)
AreSequenceEqual/AreNotSequenceEqual,AreEquivalent/AreNotEquivalent,ContainsAll/DoesNotContainAll,AreAllNotNull/AreAllDistinct/AreAllOfType,AddValueFormatter,Span<T>/Memory<T>HasCountoverloads, and structured assertion messages.Attributes / lifecycle (4.3)
MemberConditionAttribute,ArchitectureConditionAttribute,ExecutableConditionAttribute, class-levelRetryAttribute,AssemblyFixtureProvider, andTestContext.Propertieslifecycle flow.Experimental (4.3 / 2.3)
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
TestContextclass