-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[build] Add Bazel bidi flag #14083
[build] Add Bazel bidi flag #14083
Conversation
PR Review 🔍
|
PR Code Suggestions ✨
|
CI Failure Feedback 🧐(Checks updated until commit e153eb5)
✨ CI feedback usage guide:The CI feedback tool (
In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:
where Configuration options
See more information about the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a great start, but it might be tricky to incorporate that into RBE because whenever you turn on/off --bidi
- it will invalidate the cache.
A better approach would be to generate extra -bidi
test targets that will force running tests with BiDi enabled. Something like this:
# rb/spec/tests.bzl
# inside `rb_integration_test`
# .. some code above ..
# Generate a test target for bidi browser execution.
rb_test(
name = "{}-{}-bidi".format(name, browser),
size = "large",
srcs = srcs,
args = ["rb/spec/"],
data = BROWSERS[browser]["data"] + data + ["//common/src/web"],
env = BROWSERS[browser]["env"] | {"WEBDRIVER_BIDI": "true"},
main = "@bundle//bin:rspec",
tags = COMMON_TAGS + BROWSERS[browser]["tags"] + tags + ["%s-bidi" % browser],
# below we need to depend on bidi package in rb tree
deps = ["//rb/spec/integration/selenium/webdriver:spec_helper"] + BROWSERS[browser]["deps"] + deps,
visibility = ["//rb:__subpackages__"],
target_compatible_with = BROWSERS[browser]["target_compatible_with"],
)
This way you'd have the new targets like this:
- //rb/spec/integration/selenium/webdriver:driver-edge
- //rb/spec/integration/selenium/webdriver:driver-edge-bidi
Each target will be executed separately and cached.
If you only want to run bidi tests, you'd use :
bazel test --test_tag_filters edge-bidi //rb/...
29ce327
to
7297ba0
Compare
06c80af
to
3a769e1
Compare
this should be good now. Looks much better, thanks |
* [build] implement bazel targets for running ruby tests with BiDi * add necessary bidi targets to skipped-tests for rbe
User description
I was going to just commit the Ruby pieces directly, but it doesn't really make sense to do that until we know how we are running the tests with Bazel.
So, I'm happy with the Ruby code, but I need feedback on the bazel toggle and how we want to start running both modes in our test suite
Description
--bidi
Motivation and Context
This matters as we start to implement Selenium features with both WebDriver classic and WebDriver bidi. We want to make sure that both modes continue to work for people.
PR Type
Enhancement, Tests
Description
reset_driver!
calls.reset_driver!
method.Changes walkthrough 📝
36 files
action_builder_spec.rb
Add BiDi exclusive condition to ActionBuilder tests
rb/spec/integration/selenium/webdriver/action_builder_spec.rb
ActionBuilder
tests.browsing_context_spec.rb
Add BiDi exclusive condition and modify after hook in BrowsingContext
tests
rb/spec/integration/selenium/webdriver/bidi/browsing_context_spec.rb
BrowsingContext
tests.log_inspector_spec.rb
Add BiDi exclusive condition and refactor LogInspector tests
rb/spec/integration/selenium/webdriver/bidi/log_inspector_spec.rb
LogInspector
tests.reset_driver!
calls.script_spec.rb
Add BiDi exclusive condition and modify Script tests
rb/spec/integration/selenium/webdriver/bidi/script_spec.rb
Script
tests.bidi_spec.rb
Add BiDi exclusive condition and modify BiDi tests
rb/spec/integration/selenium/webdriver/bidi_spec.rb
BiDi
tests.driver_spec.rb
Add BiDi exclusive condition to Chrome Driver tests
rb/spec/integration/selenium/webdriver/chrome/driver_spec.rb
Chrome::Driver
tests.options_spec.rb
Add BiDi exclusive condition to Chrome Options tests
rb/spec/integration/selenium/webdriver/chrome/options_spec.rb
Chrome::Options
tests.profile_spec.rb
Add BiDi exclusive condition to Chrome Profile tests
rb/spec/integration/selenium/webdriver/chrome/profile_spec.rb
Chrome::Profile
tests.service_spec.rb
Add BiDi exclusive condition to Chrome Service tests
rb/spec/integration/selenium/webdriver/chrome/service_spec.rb
Chrome::Service
tests.devtools_spec.rb
Add BiDi exclusive condition and modify DevTools tests
rb/spec/integration/selenium/webdriver/devtools_spec.rb
DevTools
tests.driver_spec.rb
Add BiDi exclusive condition to Driver tests
rb/spec/integration/selenium/webdriver/driver_spec.rb
Driver
tests.driver_spec.rb
Add BiDi exclusive condition to Edge Driver tests
rb/spec/integration/selenium/webdriver/edge/driver_spec.rb
Edge::Driver
tests.options_spec.rb
Add BiDi exclusive condition to Edge Options tests
rb/spec/integration/selenium/webdriver/edge/options_spec.rb
Edge::Options
tests.profile_spec.rb
Add BiDi exclusive condition to Edge Profile tests
rb/spec/integration/selenium/webdriver/edge/profile_spec.rb
Edge::Profile
tests.service_spec.rb
Add BiDi exclusive condition to Edge Service tests
rb/spec/integration/selenium/webdriver/edge/service_spec.rb
Edge::Service
tests.element_spec.rb
Add BiDi exclusive condition to Element tests
rb/spec/integration/selenium/webdriver/element_spec.rb
Element
tests.error_spec.rb
Add BiDi exclusive condition to Error tests
rb/spec/integration/selenium/webdriver/error_spec.rb
Error
tests.driver_spec.rb
Add BiDi exclusive condition to Firefox Driver tests
rb/spec/integration/selenium/webdriver/firefox/driver_spec.rb
Firefox::Driver
tests.profile_spec.rb
Add BiDi exclusive condition to Firefox Profile tests
rb/spec/integration/selenium/webdriver/firefox/profile_spec.rb
Firefox::Profile
tests.service_spec.rb
Add BiDi exclusive condition to Firefox Service tests
rb/spec/integration/selenium/webdriver/firefox/service_spec.rb
Firefox::Service
tests.guard_spec.rb
Add BiDi exclusive condition to Guards tests
rb/spec/integration/selenium/webdriver/guard_spec.rb
Guards
tests.listener_spec.rb
Add BiDi exclusive condition to Listener tests
rb/spec/integration/selenium/webdriver/listener_spec.rb
Listener
tests.manager_spec.rb
Add BiDi exclusive condition to Manager tests
rb/spec/integration/selenium/webdriver/manager_spec.rb
Manager
tests.navigation_spec.rb
Add BiDi exclusive condition to Navigation tests
rb/spec/integration/selenium/webdriver/navigation_spec.rb
Navigation
tests.driver_spec.rb
Add BiDi exclusive condition to Remote Driver tests
rb/spec/integration/selenium/webdriver/remote/driver_spec.rb
Remote::Driver
tests.element_spec.rb
Add BiDi exclusive condition to Remote Element tests
rb/spec/integration/selenium/webdriver/remote/element_spec.rb
Remote::Element
tests.driver_spec.rb
Add BiDi exclusive condition to Safari Driver tests
rb/spec/integration/selenium/webdriver/safari/driver_spec.rb
Safari::Driver
tests.select_spec.rb
Add BiDi exclusive condition to Select tests
rb/spec/integration/selenium/webdriver/select_spec.rb
Select
tests.shadow_root_spec.rb
Add BiDi exclusive condition to ShadowRoot tests
rb/spec/integration/selenium/webdriver/shadow_root_spec.rb
ShadowRoot
tests.storage_spec.rb
Add BiDi exclusive condition to HasWebStorage tests
rb/spec/integration/selenium/webdriver/storage_spec.rb
HasWebStorage
tests.takes_screenshot_spec.rb
Add BiDi exclusive condition and refactor TakesScreenshot tests
rb/spec/integration/selenium/webdriver/takes_screenshot_spec.rb
TakesScreenshot
tests.target_locator_spec.rb
Add BiDi exclusive condition and modify after hook in TargetLocator
tests
rb/spec/integration/selenium/webdriver/target_locator_spec.rb
TargetLocator
tests.timeout_spec.rb
Add BiDi exclusive condition to Timeouts tests
rb/spec/integration/selenium/webdriver/timeout_spec.rb
Timeouts
tests.virtual_authenticator_spec.rb
Add BiDi exclusive condition to VirtualAuthenticator tests
rb/spec/integration/selenium/webdriver/virtual_authenticator_spec.rb
VirtualAuthenticator
tests.window_spec.rb
Add BiDi exclusive condition to Window tests
rb/spec/integration/selenium/webdriver/window_spec.rb
Window
tests.zipper_spec.rb
Add BiDi exclusive condition and refactor Zipper tests
rb/spec/integration/selenium/webdriver/zipper_spec.rb
Zipper
tests.2 files
spec_helper.rb
Add BiDi condition to guards and modify after hook
rb/spec/integration/selenium/webdriver/spec_helper.rb
test_environment.rb
Add BiDi condition to reset_driver and build_options
rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb
reset_driver!
method.build_options
to setweb_socket_url
based on environmentvariable.
3 files
tests.bzl
Add BiDi condition to Bazel test configurations
rb/spec/tests.bzl
.bazelrc
Add BiDi flag alias to Bazel configuration
.bazelrc
BUILD.bazel
Add BiDi flag and configuration settings to Bazel build
common/BUILD.bazel