Allow visually debugging webdriver tests locally #3343
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When running bazel tests with
--config=webdriver-debug
, tests will now spawn the GUI for chrome (instead of running in--headless
mode), so you can see what the test is doing.If the test fails, the browser window will stay open for 3s so you can see what state the app is in when the failure happened. This duration can be extended further so you can go in and check devtools etc., by setting
--test_arg=-webdriver_end_of_test_delay=1h
(this is super rudimentary for now; there is probably a better way to do this).Also when running under this debug config, pass
--verbose
to chromedriver, so that if chrome crashes on startup, the root cause will be logged (by default, it logs a super opaque error just saying that chrome has crashed).Tangentially related: this PR also updates the Go repo version for
rules_webtesting
to match thehttp_archive
version in /WORKSPACE (the Go repo was behind the WORKSPACE repo due to bazelbuild/rules_webtesting#452)rec-2023-02-02_14.12.35.mp4
Version bump: Patch