Skip to content

Comments

Feature: Update the tests to support the Microsoft Testing Platform and update the Unit Test Mode Detector#1454

Merged
glennawatson merged 3 commits intomainfrom
glennawatson/mtp
Dec 21, 2025
Merged

Feature: Update the tests to support the Microsoft Testing Platform and update the Unit Test Mode Detector#1454
glennawatson merged 3 commits intomainfrom
glennawatson/mtp

Conversation

@glennawatson
Copy link
Contributor

This pull request introduces support for the Microsoft Testing Platform (MTP) as a test runner, updates several test dependencies, and ensures the codebase and tests are compatible with the latest tooling. The most important changes are grouped below:

Microsoft Testing Platform (MTP) Integration:

  • Added configuration and property settings to enable the Microsoft Testing Platform and its code coverage extension in test projects, including a new testconfig.json for parallel execution and coverage settings (src/Directory.Build.props, src/testconfig.json, [1] [2].
  • Added a global configuration file specifying MTP as the test runner (src/global.json, src/global.jsonR1-R5).

Dependency and Package Updates:

  • Upgraded key dependencies to their latest versions, including Microsoft.Extensions.DependencyInjection, Microsoft.Extensions.Logging, and NUnit3TestAdapter. Added new packages for MTP support and code coverage (src/Directory.Packages.props, [1] [2].
  • Improved handling of framework-specific package versions, especially for System.Runtime.Serialization.Formatters, to ensure compatibility across different target frameworks (src/Directory.Packages.props, [1] [2].

Test and Detection Enhancements:

Copy link
Contributor

Copilot AI left a 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 pull request adds support for the Microsoft Testing Platform (MTP) as a test runner alongside the existing NUnit framework. The changes include configuration files for MTP, updates to test detection logic, new unit tests, and significant dependency version upgrades.

  • Adds MTP configuration via testconfig.json and global.json for parallel test execution and code coverage
  • Updates DefaultModeDetector to recognize MTP assemblies as test runners
  • Upgrades multiple packages to version 10.0.1 and 18.x versions

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/testconfig.json Configures MTP parallel execution and code coverage settings with module path filters
src/global.json Specifies Microsoft Testing Platform as the test runner
src/Splat/ModeDetection/DefaultModeDetector.cs Adds "MICROSOFT.TESTING.PLATFORM" to the list of recognized test framework markers
src/Splat.Tests/ModeDetection/DefaultModeDetectorTests.cs Adds two new tests to verify MTP detection functionality
src/Directory.Packages.props Updates package versions including Microsoft.Extensions packages, test SDK, and introduces framework-specific versioning logic for System.Runtime.Serialization.Formatters
src/Directory.Build.props Configures MTP support properties and adds testconfig.json to test projects with code coverage package reference

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

glennawatson and others added 2 commits December 22, 2025 00:08
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Dec 21, 2025

Codecov Report

❌ Patch coverage is 2.56410% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 41.29%. Comparing base (2bc1a8c) to head (78c8223).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...at.Tests/ModeDetection/DefaultModeDetectorTests.cs 0.00% 38 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1454       +/-   ##
===========================================
- Coverage   73.27%   41.29%   -31.99%     
===========================================
  Files         108      149       +41     
  Lines        4345     7822     +3477     
  Branches      617      844      +227     
===========================================
+ Hits         3184     3230       +46     
- Misses        963     4408     +3445     
+ Partials      198      184       -14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@glennawatson glennawatson merged commit 06697ac into main Dec 21, 2025
11 of 14 checks passed
@glennawatson glennawatson deleted the glennawatson/mtp branch December 21, 2025 13:57
@github-actions
Copy link

github-actions bot commented Jan 5, 2026

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants