Skip to content

[dotnet] [test] Upgrade NUnit library to v5 - #18114

Merged
nvborisenko merged 1 commit into
SeleniumHQ:trunkfrom
nvborisenko:dotnet-test-nunit-5
Oct 1, 2026
Merged

nvborisenko merged 1 commit into
SeleniumHQ:trunkfrom
nvborisenko:dotnet-test-nunit-5

Conversation

@nvborisenko

Copy link
Copy Markdown
Member

NUnit 5 is released.

💥 What does this PR do?

This pull request updates the NUnit dependencies to their latest versions in both the paket.dependencies and paket.nuget.bzl files. The main focus is on keeping the test framework and analyzers current, which may bring new features, bug fixes, and improved compatibility.

Dependency updates:

  • Upgraded the NUnit package from version 4.6.0 to 5.0.0 in both dotnet/paket.dependencies and dotnet/paket.nuget.bzl. [1] [2]
  • Upgraded the NUnit.Analyzers package from version 4.13.0 to 4.15.0 in both dotnet/paket.dependencies and dotnet/paket.nuget.bzl. [1] [2]

🤖 AI assistance

  • No substantial AI assistance used
  • AI assisted (complete below)
    • Tool(s):
    • What was generated:
    • I reviewed all AI output and can explain the change

🔄 Types of changes

  • Cleanup (formatting, renaming)

@qodo-code-review

qodo-code-review Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Code Review by Qodo

Grey Divider

Sorry, something went wrong

We weren't able to complete the code review on our side. Please try again manually by commenting /agentic_review on this PR.

Grey Divider

Qodo Logo

@selenium-ci selenium-ci added C-dotnet .NET Bindings B-build Includes scripting, bazel and CI integrations B-support Issue or PR related to support classes labels Oct 1, 2026
@selenium-ci

Copy link
Copy Markdown
Member

Thank you, @nvborisenko for this code suggestion.

The support packages contain example code that many users find helpful, but they do not necessarily represent
the best practices for using Selenium, and the Selenium team is not currently merging changes to them.

After reviewing the change, unless it is a critical fix or a feature that is needed for Selenium
to work, we will likely close the PR.

We actively encourage people to add the wrapper and helper code that makes sense for them to their own frameworks.
If you have any questions, please contact us

@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Upgrade .NET tests to NUnit 5

⚙️ Configuration changes 🧪 Tests 🕐 20-40 Minutes

Grey Divider

AI Description

• Upgrade NUnit and its analyzers across .NET test projects and Bazel dependencies.
• Refresh resolved dependencies, including transitive packages required by NUnit 5.
• Await the BiDi cancellation assertion to match NUnit 5's async API.
Diagram

graph TD
  A["Paket manifest"] --> B["Resolved lockfile"] --> C["Bazel packages"] --> E["NUnit packages"] --> F["Test suites"]
  D["Test projects"] --> E
Loading
High-Level Assessment

Keep the Paket lockfile, generated Bazel package metadata, and project references synchronized as this PR does. Centralizing versions in MSBuild alone would not replace Bazel's separate dependency metadata; review should focus on NUnit 5 compatibility and test results.

Files changed (8) +29 / -29

Tests (1) +1 / -1
SessionTests.csAwait the cancellation exception assertion +1/-1

Await the cancellation exception assertion

• Awaits Assert.ThrowsAsync in the event-stream cancellation test to accommodate NUnit 5's asynchronous assertion API.

dotnet/test/webdriver/BiDi/Session/SessionTests.cs

Other (7) +28 / -28
paket.dependenciesRequest NUnit 5 and analyzer 4.15 +2/-2

Request NUnit 5 and analyzer 4.15

• Raises the declared NUnit version from 4.6.0 to 5.0.0 and NUnit.Analyzers from 4.13.0 to 4.15.0 for Paket resolution.

dotnet/paket.dependencies

paket.lockLock upgraded NUnit and transitive packages +13/-13

Lock upgraded NUnit and transitive packages

• Records the new NUnit and analyzer versions. Also raises System.Threading.Tasks.Extensions, System.ValueTuple, and System.Runtime.CompilerServices.Unsafe and refreshes several framework-specific dependency restrictions.

dotnet/paket.lock

paket.nuget.bzlRefresh Bazel NuGet package metadata +5/-5

Refresh Bazel NuGet package metadata

• Updates package versions and SHA-512 hashes for NUnit, its analyzers, and the upgraded transitive packages. Refreshes framework-specific dependency metadata for System.Threading.Tasks.Extensions and System.ValueTuple.

dotnet/paket.nuget.bzl

Selenium.WebDriver.Remote.Tests.csprojUpgrade remote test project references +2/-2

Upgrade remote test project references

• References NUnit 5.0.0 and NUnit.Analyzers 4.15.0; the test adapter version remains unchanged.

dotnet/test/remote/Selenium.WebDriver.Remote.Tests.csproj

Selenium.Support.Tests.csprojUpgrade support test project references +2/-2

Upgrade support test project references

• References NUnit 5.0.0 and NUnit.Analyzers 4.15.0 without changing the other test dependencies.

dotnet/test/support/Selenium.Support.Tests.csproj

Selenium.Testing.NUnit.csprojUpgrade shared NUnit testing project references +2/-2

Upgrade shared NUnit testing project references

• Raises NUnit and NUnit.Analyzers references in the shared testing project to 5.0.0 and 4.15.0, respectively.

dotnet/test/testing.nunit/Selenium.Testing.NUnit.csproj

Selenium.WebDriver.Tests.csprojUpgrade WebDriver test project references +2/-2

Upgrade WebDriver test project references

• References NUnit 5.0.0 and NUnit.Analyzers 4.15.0 while retaining the existing test adapter.

dotnet/test/webdriver/Selenium.WebDriver.Tests.csproj

@nvborisenko
nvborisenko merged commit 90b0072 into SeleniumHQ:trunk Oct 1, 2026
31 checks passed
@nvborisenko
nvborisenko deleted the dotnet-test-nunit-5 branch October 1, 2026 18:01
This was referenced Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-build Includes scripting, bazel and CI integrations B-support Issue or PR related to support classes C-dotnet .NET Bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants