-
Notifications
You must be signed in to change notification settings - Fork 1.7k
doc: a tip about debugging UI tests #3224
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
Conversation
With Chrome 80+ rolling out, debugging UI tests got trickier. There is a way to work around the issue and this change documents the trick.
wchargin
left a comment
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.
Nice; thank you!
DEVELOPMENT.md
Outdated
|
|
||
| ### Debugging UI Tests Locally | ||
|
|
||
| Our UI tests (e.g., //tensorboard/components/vz_sorting/test) use HTML import which is now deprecated from all browsers (Chrome 79- had the native support) and is run without any polyfills. In order to debug tests, you may want to run a Chromium, which is used in our CI, that supports HTML import which can be found in `./bazel-bin/third_party/chromium/chromium.out` (exact path to binary will differ by OS you are on; for Linux, the full path is `./bazel-bin/third_party/chromium/chromium.out/chrome-linux/chrome`). If it is missing, please run `bazel build third_party/chromium` beforehand. |
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.
You say that I might want to “run Chromium”—do you mean specifically
that I should launch Chromium (as you describe), then bazel run the
:test_web_library target, then navigate to the local server that that
spawns in my new Chromium, then navigate to the tests.html entry
point? If so, it might be helpful to specify this. (It wasn’t my first
guess—I had to poke around with a few things to find one that worked.)
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.
Added an example section which should make this clearer. Hope it clarifies.
wchargin
left a comment
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.
Great example; thanks!
DEVELOPMENT.md
Outdated
| bazel build third_party/chromium | ||
| ./bazel-bin/third_party/chromium/chromium.out/chrome-linux/chrome | ||
|
|
||
| # Lastly, put the address returend by the web server into the Chromium. |
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.
sp.: s/returend/returned/
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.
nit: While fixing this, there’s also a superfluous blank line at the end.
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.
It's a new word that I coined. It is 🔥
With Chrome 80+ rolling out, debugging UI tests got trickier. There is a
way to work around the issue and this change documents the trick.