-
-
Notifications
You must be signed in to change notification settings - Fork 21
Add support for Microsoft.Testing.Platform
#53
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: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Martin Costello <[email protected]> Co-authored-by: Oleksii Holub <[email protected]>
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
Migrates the logger from VSTest to Microsoft.Testing.Platform, replacing the VSTest logger with a Testing Platform extension that reports to GitHub Actions.
- Introduces a TestReporter extension (data consumer and session lifetime handler) with command-line options.
- Updates summary/annotation generation and internal models (TestOutcome, TestResult, TestDefinition), removing VSTest-specific code.
- Adjusts the template and statistics to align with the new outcome model.
Reviewed Changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| GitHubActionsTestLogger/Utils/Extensions/TestRunCriteriaExtensions.cs | Removed VSTest-specific test run settings parsing. |
| GitHubActionsTestLogger/Utils/Extensions/TestResultExtensions.cs | Removed VSTest-specific source info parsing and stack frame logic. |
| GitHubActionsTestLogger/Utils/Extensions/TestCaseExtensions.cs | Removed VSTest-specific name parsing helpers. |
| GitHubActionsTestLogger/Utils/Extensions/TestPlatformExtensions.cs | Adds helper to read single CLI option arguments from Microsoft.Testing.Platform. |
| GitHubActionsTestLogger/TestingPlatformBuilderHook.cs | Adds Testing Platform builder hook to register GitHub reporting. |
| GitHubActionsTestLogger/TestSummaryTemplate.cshtml | Switches to new TestOutcome enum (uses None vs NotFound) and cleans up imports. |
| GitHubActionsTestLogger/TestRunStatistics.cs | Aligns overall outcome with new enum (removes NotFound branch). |
| GitHubActionsTestLogger/TestResult.cs | New internal model for test results. |
| GitHubActionsTestLogger/TestReporterOptionsProvider.cs | Defines CLI options and validation for the new reporter. |
| GitHubActionsTestLogger/TestReporterOptions.cs | New options for reporter and resolver from CLI. |
| GitHubActionsTestLogger/TestReporterExtension.cs | Extension metadata and enablement. |
| GitHubActionsTestLogger/TestReporterContext.cs | Core context for formatting annotations and writing the summary. |
| GitHubActionsTestLogger/TestReporter.cs | Implements IDataConsumer and ITestSessionLifetimeHandler to report results. |
| GitHubActionsTestLogger/TestOutcome.cs | New internal TestOutcome enum and mapping from Testing Platform states. |
| GitHubActionsTestLogger/TestLoggerOptions.cs | Removed old VSTest logger options. |
| GitHubActionsTestLogger/TestLoggerContext.cs | Removed old VSTest logger context. |
| GitHubActionsTestLogger/TestLogger.cs | Removed old VSTest logger. |
| GitHubActionsTestLogger/TestDefinition.cs | New internal model for test definitions and metadata. |
| GitHubActionsTestLogger/GitHubWorkflow.cs | Class made internal; used by reporter/summary. |
| GitHubActionsTestLogger/GitHubReportExtensions.cs | Registers reporter and options provider in the TestApplicationBuilder. |
| GitHubActionsTestLogger/GitHubActionsTestLogger.csproj | Replaces VSTest package with Microsoft.Testing.Platform. |
| GitHubActionsTestLogger.Tests/* | Updates tests to use TestReporterContext and TestReporterOptions. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
vstest to Microsoft.Testing.Platform (#43)vstest to Microsoft.Testing.Platform
|
@Evangelink how do I enable a custom extension when using MTP with xUnit v3? xUnit appears to generate its own Here's the test project file: Here's the hook code: |
|
Got it working |
vstest to Microsoft.Testing.PlatformMicrosoft.Testing.Platform
|
FYI, MTP is now on 2.0.1. I don't know if you want to target only latest or not. |
@Evangelink what's the recommended support policy? Target the earliest version of MTP that provides the features I need? Or always target latest? |
Closes #41
Based on #43 by @Evangelink