SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
30.42k stars 8.15k forks source link

[dotnet] Fix running of support tests in CI bazel #14314

Closed nvborisenko closed 2 months ago

nvborisenko commented 2 months ago

User description

Description

Fix CI build via missing migration of support tests.

Motivation and Context

Types of changes

Checklist


PR Type

Bug fix


Description


Changes walkthrough ๐Ÿ“

Relevant files
Bug fix
BUILD.bazel
Update target framework and dependencies for Events tests

dotnet/test/support/Events/BUILD.bazel
  • Updated target framework from net7.0 to net8.0
  • Changed dependency to webdriver-net8.0
  • +4/-4     
    BUILD.bazel
    Update target framework and dependencies for Extensions tests

    dotnet/test/support/Extensions/BUILD.bazel
  • Updated target framework from net7.0 to net8.0
  • Changed dependency to webdriver-net8.0
  • +2/-2     
    BUILD.bazel
    Update target framework and dependencies for UI tests       

    dotnet/test/support/UI/BUILD.bazel
  • Updated target framework from net7.0 to net8.0
  • Changed dependency to webdriver-net8.0
  • +3/-3     

    ๐Ÿ’ก PR-Agent usage: Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    codiumai-pr-agent-pro[bot] commented 2 months ago

    PR Reviewer Guide ๐Ÿ”

    โฑ๏ธ Estimated effort to review: 2 ๐Ÿ”ต๐Ÿ”ตโšชโšชโšช
    ๐Ÿงช No relevant tests
    ๐Ÿ”’ No security concerns identified
    โšก No key issues to review
    codiumai-pr-agent-pro[bot] commented 2 months ago

    PR Code Suggestions โœจ

    CategorySuggestion                                                                                                                                    Score
    Best practice
    Specify compatible versions for NuGet packages ___ **To avoid potential conflicts and ensure compatibility, explicitly specify the
    versions of the NuGet packages Moq and NUnit that are compatible with the net8.0
    target framework.** [dotnet/test/support/Extensions/BUILD.bazel [8-13]](https://github.com/SeleniumHQ/selenium/pull/14314/files#diff-ae83b5ba573ae081b9fb064a706b35e93d3745f94b05c67f45ab874361abcca7R8-R13) ```diff deps = [ "//dotnet/src/support", "//dotnet/src/webdriver:webdriver-net8.0", "//dotnet/test/common:fixtures", - framework("nuget", "Moq"), - framework("nuget", "NUnit"), + framework("nuget", "Moq", "4.0.0"), # Example version, replace with actual compatible version + framework("nuget", "NUnit", "3.13.0"), # Example version, replace with actual compatible version ] ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 8 Why: Specifying the versions of NuGet packages is a best practice that can prevent compatibility issues and conflicts, making the codebase more robust and reliable.
    8
    Maintainability
    Ensure consistent versioning in dependency names ___ **Ensure consistency in dependency naming by using the same versioning suffix for all
    dependencies that are specific to a target framework version. This helps in
    maintaining and updating dependencies more efficiently.** [dotnet/test/support/Events/BUILD.bazel [12-17]](https://github.com/SeleniumHQ/selenium/pull/14314/files#diff-a5affd36ee0eda1f349800ba3a1571f4e811250f3d178a288684596edf7644cdR12-R17) ```diff deps = [ "//dotnet/src/support", "//dotnet/src/webdriver:webdriver-net8.0", - "//dotnet/test/common:fixtures", + "//dotnet/test/common:fixtures:fixtures-net8.0", framework("nuget", "NUnit"), framework("nuget", "Moq"), ] ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 7 Why: The suggestion improves maintainability by ensuring consistent versioning in dependency names, which can help in managing dependencies more efficiently. However, it is not crucial for functionality.
    7
    Enhancement
    Update test data paths to match the new framework version ___ **To ensure that all test data and resources are aligned with the new framework
    version, consider reviewing and updating the paths and contents of the data
    dependencies listed under the data attribute.** [dotnet/test/support/UI/BUILD.bazel [42-43]](https://github.com/SeleniumHQ/selenium/pull/14314/files#diff-66f883a033ce4cc34758f1e323b40da21349c346d6fd6ed81f126b7f0ac276a8R42-R43) ```diff data = [ - "//dotnet/test/common:test-data", + "//dotnet/test/common:test-data-net8.0", # Updated path to include framework-specific data ] ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 7 Why: Updating test data paths to match the new framework version is a good enhancement that ensures consistency and alignment with the updated framework, but it is not critical for functionality.
    7
    Possible issue
    Review and update dependencies for compatibility with net8.0 ___ **Given the update to net8.0, verify if additional dependencies or updates are
    required for the SmallTests suite to ensure full compatibility and functionality
    with the new framework version.** [dotnet/test/support/UI/BUILD.bazel [17-22]](https://github.com/SeleniumHQ/selenium/pull/14314/files#diff-66f883a033ce4cc34758f1e323b40da21349c346d6fd6ed81f126b7f0ac276a8R17-R22) ```diff deps = [ "//dotnet/src/support", "//dotnet/src/webdriver:webdriver-net8.0", "//dotnet/test/common:fixtures", - framework("nuget", "NUnit"), - framework("nuget", "Moq"), + framework("nuget", "NUnit"), # Verify version compatibility + framework("nuget", "Moq"), # Verify version compatibility + "//additional/dependency:if-needed", # Add if additional dependencies are identified ] ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 6 Why: The suggestion is useful for ensuring compatibility with the new framework version, but it is more of a reminder to verify dependencies rather than a concrete improvement.
    6