[dotnet] [test] Start test webserver globally before any tests in Support#17275
[dotnet] [test] Start test webserver globally before any tests in Support#17275nvborisenko merged 2 commits intoSeleniumHQ:trunkfrom
Conversation
Review Summary by QodoCentralize test web server setup in assembly-level fixture
WalkthroughsDescription• Centralize web server setup/teardown in assembly-level fixture • Remove duplicate server initialization from individual test classes • Ensure consistent test environment across all Support project tests File Changes1. dotnet/test/support/AssemblyFixture.cs
|
|
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. |
Code Review by Qodo
1. Webserver leak on setup failure
|
Hopefully fixes CI tests.
💥 What does this PR do?
This pull request refactors the setup and teardown logic for starting and stopping the web server and remote server in the test suite. The main improvement is the introduction of a shared
AssemblyFixtureclass to handle this functionality at the assembly level, which removes redundant setup/teardown code from individual test classes.Test infrastructure improvements:
AssemblyFixtureclass indotnet/test/support/AssemblyFixture.csthat uses NUnit's[SetUpFixture]to start and stop the web server (and remote server if needed) once for all tests, ensuring consistent and efficient test environment setup and cleanup.[OneTimeSetUp]and[OneTimeTearDown]methods fromPopupWindowFinderTestsandSelectBrowserTests, as this logic is now centralized inAssemblyFixture. [1] [2]🔄 Types of changes