[dotnet] [test] Migrate to MTP#17384
Conversation
|
Thank you, @nvborisenko for this code suggestion. The support packages contain example code that many users find helpful, but they do not necessarily represent After reviewing the change, unless it is a critical fix or a feature that is needed for Selenium We actively encourage people to add the wrapper and helper code that makes sense for them to their own frameworks. |
Review Summary by QodoMigrate .NET tests to Microsoft Testing Platform (MTP)
WalkthroughsDescription• Migrate .NET test infrastructure from NUnit to Microsoft Testing Platform • Update NUnit version from 3.13.2 to 4.5.1 with NUnit3TestAdapter 6.2.0 • Replace custom NUnit shim with hand-ported MTP entry point implementation • Update test argument format from --params to --test-parameter and --where to --filter • Add MTP dependencies and remove legacy NUnitLite dependency File Changes1. dotnet/private/mtp_shim.cs
|
Code Review by Qodo
1. nunit_test removed without deprecation
|
There was a problem hiding this comment.
Pull request overview
Migrates the .NET test projects and Bazel NUnit test suite runner from the previous NUnitLite/MSBuild-based approach to the Microsoft Testing Platform (MTP), aligning CLI parameters, dependencies, and entry-point wiring for Bazel-driven test execution.
Changes:
- Updated .NET test project files to enable MTP and bumped NUnit/NUnit3TestAdapter versions.
- Reworked Bazel
dotnet_nunit_test_suiteto use an MTP entry-point shim and VSTest-style filtering/parameters. - Updated Paket dependencies/lock and Bazel module repos to include MTP + NUnit adapter requirements.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/test/webdriver/Selenium.WebDriver.Tests.csproj | Enables MTP runner settings; updates NUnit + adapter references. |
| dotnet/test/support/Selenium.WebDriver.Support.Tests.csproj | Same MTP migration and package updates for Support tests. |
| dotnet/test/remote/Selenium.WebDriver.Remote.Tests.csproj | Same MTP migration and package updates for Remote tests. |
| dotnet/test/webdriver/BUILD.bazel | Removes direct Bazel dependency on NUnit package (now provided by suite rule). |
| dotnet/test/support/BUILD.bazel | Removes direct Bazel dependency on NUnit package (now provided by suite rule). |
| dotnet/test/remote/BUILD.bazel | Removes direct Bazel dependency on NUnit package (now provided by suite rule). |
| dotnet/private/nunit_test.bzl | Removes obsolete NUnitLite shim-based test rule. |
| dotnet/private/mtp_shim.cs | Adds checked-in MTP entry point for Bazel (no MSBuild codegen). |
| dotnet/private/dotnet_nunit_test_suite.bzl | Switches runner args to MTP (--test-parameter, --filter) and adds MTP deps. |
| dotnet/private/BUILD.bazel | Exports MTP shim and adds an adapter runtime wrapper via import_library. |
| dotnet/paket.dependencies | Replaces NUnitLite with NUnit 4 + NUnit3TestAdapter + MTP packages. |
| dotnet/paket.lock | Locks new dependency graph introduced by MTP + adapter. |
| dotnet/paket.nuget.bzl | Updates Bazel-extracted NuGet metadata for the new packages. |
| dotnet/defs.bzl | Removes export of the deleted nunit_test macro. |
| MODULE.bazel | Adds a repo for nuget.nunit3testadapter.v6.2.0 used by the adapter runtime wrapper. |
Seems successfully migrated to new modern Microsoft.Testing.Platform
🔗 Related Issues
Contributes to #15536
💥 What does this PR do?
🤖 AI assistance
🔄 Types of changes