[dotnet] [test] Rename namespace for common test project#17276
[dotnet] [test] Rename namespace for common test project#17276nvborisenko merged 6 commits intoSeleniumHQ:trunkfrom
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 QodoRefactor .NET test suite with unified namespace structure and infrastructure reorganization
WalkthroughsDescriptionComprehensive refactoring of the .NET test suite to improve code organization and maintainability: * **Namespace reorganization**: Moved all test classes from scattered namespaces (e.g., OpenQA.Selenium, OpenQA.Selenium.DevTools, OpenQA.Selenium.BiDi.*) into a unified structure under OpenQA.Selenium.Common.Tests and its sub-namespaces * **Infrastructure consolidation**: Reorganized test infrastructure and utilities into OpenQA.Selenium.Common.Tests.Infrastructure with sub-folders for DriverConfigs and Environment * **Global usings**: Added centralized GlobalUsings.cs file to reduce import duplication across test files * **Import standardization**: Updated all references from OpenQA.Selenium.Environment to OpenQA.Selenium.Common.Tests.Infrastructure.Environment throughout the test suite * **Browser enum simplification**: Simplified IgnoreBrowser attributes by removing Selenium. prefix and using Infrastructure.Browser references * **Type reference cleanup**: Removed unnecessary namespace prefixes in type references (e.g., BrowsingContext.ContextType.Window → ContextType.Window) * **Unused imports removal**: Cleaned up unused using statements across all test files * **Project configuration**: Updated Selenium.WebDriver.Common.Tests.csproj root namespace and appconfig.json driver configuration references File Changes1. dotnet/test/common/DevTools/DevToolsNetworkTests.cs
|
Code Review by Qodo
1. RootNamespace set to Common.Tests
|
Trying to clean common test project:
Infrastructurefolder🔗 Related Issues
Contributes to #15536
💥 What does this PR do?
This pull request restructures the .NET WebDriver test suite by consolidating the shared test code from the
commontest project into a newwebdrivertest project. All references, dependencies, and visibility settings have been updated accordingly across the build system, solution, and test projects. Additionally, some namespace imports have been updated to reflect the new organization.Key changes:
Test Project Consolidation and References
dotnet/test/commontest project and introduceddotnet/test/webdriveras the new location for shared test code. All test projects and build files now referencewebdriverinstead ofcommon. [1] [2] [3] [4] [5] [6] [7]Build and Visibility Updates
commonwithwebdriverfor test data, dependencies, and visibility settings, ensuring the new shared test project is used throughout. [1] [2] [3] [4] [5] [6]InternalsVisibleTo and Assembly Metadata
InternalsVisibleToattributes and related metadata fromWebDriver.Common.TeststoWebDriver.Testsin both project files and Bazel build definitions. [1] [2] [3] [4]Namespace and Import Adjustments
usingstatements in test files to import from the newOpenQA.Selenium.TestsandOpenQA.Selenium.Tests.Infrastructure.Environmentnamespaces, reflecting the new project structure. [1] [2] [3] [4] [5]These changes improve the maintainability and clarity of the .NET WebDriver test suite by centralizing shared test infrastructure and updating references throughout the codebase.
🔄 Types of changes