-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[build] Add Bazel bidi flag #14083
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
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
--bidiMotivation 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 testsrb/spec/integration/selenium/webdriver/action_builder_spec.rb
ActionBuildertests.browsing_context_spec.rb
Add BiDi exclusive condition and modify after hook in BrowsingContexttestsrb/spec/integration/selenium/webdriver/bidi/browsing_context_spec.rb
BrowsingContexttests.log_inspector_spec.rb
Add BiDi exclusive condition and refactor LogInspector testsrb/spec/integration/selenium/webdriver/bidi/log_inspector_spec.rb
LogInspectortests.reset_driver!calls.script_spec.rb
Add BiDi exclusive condition and modify Script testsrb/spec/integration/selenium/webdriver/bidi/script_spec.rb
Scripttests.bidi_spec.rb
Add BiDi exclusive condition and modify BiDi testsrb/spec/integration/selenium/webdriver/bidi_spec.rb
BiDitests.driver_spec.rb
Add BiDi exclusive condition to Chrome Driver testsrb/spec/integration/selenium/webdriver/chrome/driver_spec.rb
Chrome::Drivertests.options_spec.rb
Add BiDi exclusive condition to Chrome Options testsrb/spec/integration/selenium/webdriver/chrome/options_spec.rb
Chrome::Optionstests.profile_spec.rb
Add BiDi exclusive condition to Chrome Profile testsrb/spec/integration/selenium/webdriver/chrome/profile_spec.rb
Chrome::Profiletests.service_spec.rb
Add BiDi exclusive condition to Chrome Service testsrb/spec/integration/selenium/webdriver/chrome/service_spec.rb
Chrome::Servicetests.devtools_spec.rb
Add BiDi exclusive condition and modify DevTools testsrb/spec/integration/selenium/webdriver/devtools_spec.rb
DevToolstests.driver_spec.rb
Add BiDi exclusive condition to Driver testsrb/spec/integration/selenium/webdriver/driver_spec.rb
Drivertests.driver_spec.rb
Add BiDi exclusive condition to Edge Driver testsrb/spec/integration/selenium/webdriver/edge/driver_spec.rb
Edge::Drivertests.options_spec.rb
Add BiDi exclusive condition to Edge Options testsrb/spec/integration/selenium/webdriver/edge/options_spec.rb
Edge::Optionstests.profile_spec.rb
Add BiDi exclusive condition to Edge Profile testsrb/spec/integration/selenium/webdriver/edge/profile_spec.rb
Edge::Profiletests.service_spec.rb
Add BiDi exclusive condition to Edge Service testsrb/spec/integration/selenium/webdriver/edge/service_spec.rb
Edge::Servicetests.element_spec.rb
Add BiDi exclusive condition to Element testsrb/spec/integration/selenium/webdriver/element_spec.rb
Elementtests.error_spec.rb
Add BiDi exclusive condition to Error testsrb/spec/integration/selenium/webdriver/error_spec.rb
Errortests.driver_spec.rb
Add BiDi exclusive condition to Firefox Driver testsrb/spec/integration/selenium/webdriver/firefox/driver_spec.rb
Firefox::Drivertests.profile_spec.rb
Add BiDi exclusive condition to Firefox Profile testsrb/spec/integration/selenium/webdriver/firefox/profile_spec.rb
Firefox::Profiletests.service_spec.rb
Add BiDi exclusive condition to Firefox Service testsrb/spec/integration/selenium/webdriver/firefox/service_spec.rb
Firefox::Servicetests.guard_spec.rb
Add BiDi exclusive condition to Guards testsrb/spec/integration/selenium/webdriver/guard_spec.rb
Guardstests.listener_spec.rb
Add BiDi exclusive condition to Listener testsrb/spec/integration/selenium/webdriver/listener_spec.rb
Listenertests.manager_spec.rb
Add BiDi exclusive condition to Manager testsrb/spec/integration/selenium/webdriver/manager_spec.rb
Managertests.navigation_spec.rb
Add BiDi exclusive condition to Navigation testsrb/spec/integration/selenium/webdriver/navigation_spec.rb
Navigationtests.driver_spec.rb
Add BiDi exclusive condition to Remote Driver testsrb/spec/integration/selenium/webdriver/remote/driver_spec.rb
Remote::Drivertests.element_spec.rb
Add BiDi exclusive condition to Remote Element testsrb/spec/integration/selenium/webdriver/remote/element_spec.rb
Remote::Elementtests.driver_spec.rb
Add BiDi exclusive condition to Safari Driver testsrb/spec/integration/selenium/webdriver/safari/driver_spec.rb
Safari::Drivertests.select_spec.rb
Add BiDi exclusive condition to Select testsrb/spec/integration/selenium/webdriver/select_spec.rb
Selecttests.shadow_root_spec.rb
Add BiDi exclusive condition to ShadowRoot testsrb/spec/integration/selenium/webdriver/shadow_root_spec.rb
ShadowRoottests.storage_spec.rb
Add BiDi exclusive condition to HasWebStorage testsrb/spec/integration/selenium/webdriver/storage_spec.rb
HasWebStoragetests.takes_screenshot_spec.rb
Add BiDi exclusive condition and refactor TakesScreenshot testsrb/spec/integration/selenium/webdriver/takes_screenshot_spec.rb
TakesScreenshottests.target_locator_spec.rb
Add BiDi exclusive condition and modify after hook in TargetLocatortestsrb/spec/integration/selenium/webdriver/target_locator_spec.rb
TargetLocatortests.timeout_spec.rb
Add BiDi exclusive condition to Timeouts testsrb/spec/integration/selenium/webdriver/timeout_spec.rb
Timeoutstests.virtual_authenticator_spec.rb
Add BiDi exclusive condition to VirtualAuthenticator testsrb/spec/integration/selenium/webdriver/virtual_authenticator_spec.rb
VirtualAuthenticatortests.window_spec.rb
Add BiDi exclusive condition to Window testsrb/spec/integration/selenium/webdriver/window_spec.rb
Windowtests.zipper_spec.rb
Add BiDi exclusive condition and refactor Zipper testsrb/spec/integration/selenium/webdriver/zipper_spec.rb
Zippertests.2 files
spec_helper.rb
Add BiDi condition to guards and modify after hookrb/spec/integration/selenium/webdriver/spec_helper.rb
test_environment.rb
Add BiDi condition to reset_driver and build_optionsrb/spec/integration/selenium/webdriver/spec_support/test_environment.rb
reset_driver!method.build_optionsto setweb_socket_urlbased on environmentvariable.
3 files
tests.bzl
Add BiDi condition to Bazel test configurationsrb/spec/tests.bzl
.bazelrc
Add BiDi flag alias to Bazel configuration.bazelrc
BUILD.bazel
Add BiDi flag and configuration settings to Bazel buildcommon/BUILD.bazel