-
Notifications
You must be signed in to change notification settings - Fork 6k
Document MTP v1 to v2 migration #48673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
docs/core/testing/microsoft-testing-platform-migration-from-v1-to-v2.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, recommending to run through copilot yet to polish the stylistics (unless that has been done already).
docs/core/testing/microsoft-testing-platform-migration-from-v1-to-v2.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Jakub Jareš <me@jakubjares.com> Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
There was a problem hiding this comment.
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 documents the migration process from Microsoft.Testing.Platform v1 to v2, providing guidance for users upgrading to the new version. The documentation covers breaking changes and behavioral differences between versions.
Key changes:
- Creates comprehensive migration documentation for Microsoft.Testing.Platform v2
- Adds table of contents entry for the new migration guide
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
File | Description |
---|---|
docs/core/testing/microsoft-testing-platform-migration-from-v1-to-v2.md | New migration guide documenting breaking changes and behavior differences when upgrading from v1 to v2 |
docs/navigate/devops-testing/toc.yml | Adds navigation entry for the migration guide in the testing documentation table of contents |
--- | ||
title: Microsoft.Testing.Platform migration from v1 to v2 | ||
description: Learn about migrating to Microsoft.Testing.Platform v2. | ||
author: Youssef1313 | ||
ms.author: ygerges | ||
ms.date: 09/23/2025 | ||
--- |
Copilot
AI
Oct 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AI-generated content should include 'ai-usage: ai-generated' in the frontmatter according to .NET documentation guidelines.
Copilot generated this review using guidance from repository custom instructions.
- A `CancellationToken` parameter was added to `IOutputDevice.DisplayAsync`. | ||
- Methods in `ITestSessionLifetimeHandler` interface are changed to have a `ITestSessionContext` parameter instead of both `SessionUid` and `CancellationToken` parameters. | ||
- `IDataConsumer` is moved from `Microsoft.Testing.Platform.Extensions.TestHost` namespace to `Microsoft.Testing.Platform.Extensions`. |
Copilot
AI
Oct 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ordered and unordered lists should use complete sentences with proper punctuation, ending with a period if it's more than three words according to .NET documentation guidelines.
Copilot generated this review using guidance from repository custom instructions.
|
||
Running MTP test projects with .NET 10 SDK now requires opting-in to the MTP-based `dotnet test` and can no longer be run with the VSTest-based implementation, which was previously enabled by `TestingPlatformDotnetTestSupport` MSBuild property in MTP v1. | ||
|
||
To opt-in the MTP-based implementation, create global.json in repository or solution root (or update existing global.json if you have one already), to have test runner set as Microsoft.Testing.Platform, as shown in the following example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gewarren This global.json feature is RC2 only. Is it fine to get this merged now? Or should we wait until RC2 is shipped?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid confusion, I think it's best to wait a week.
docs/core/testing/microsoft-testing-platform-migration-from-v1-to-v2.md
Outdated
Show resolved
Hide resolved
…-to-v2.md Co-authored-by: Jakub Jareš <me@jakubjares.com>
docs/core/testing/microsoft-testing-platform-migration-from-v1-to-v2.md
Outdated
Show resolved
Hide resolved
|
||
### API signature changes | ||
|
||
- A `CancellationToken` parameter was added to <xref:Microsoft.Testing.Platform.OutputDevice.IOutputDevice.DisplayAsync(Microsoft.Testing.Platform.Extensions.OutputDevice.IOutputDeviceDataProducer,Microsoft.Testing.Platform.OutputDevice.IOutputDeviceData)?displayProperty=nameWithType>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Youssef1313 Do you use the xref-helper extension to help with xrefs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I used it.
docs/core/testing/microsoft-testing-platform-migration-from-v1-to-v2.md
Outdated
Show resolved
Hide resolved
|
||
Running MTP test projects with .NET 10 SDK now requires opting-in to the MTP-based `dotnet test` and can no longer be run with the VSTest-based implementation, which was previously enabled by `TestingPlatformDotnetTestSupport` MSBuild property in MTP v1. | ||
|
||
To opt-in the MTP-based implementation, create global.json in repository or solution root (or update existing global.json if you have one already), to have test runner set as Microsoft.Testing.Platform, as shown in the following example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid confusion, I think it's best to wait a week.
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Internal previews