Skip to content

Commit 49ec07b

Browse files
authored
doc: a tip about debugging UI tests (#3224)
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.
1 parent 2307c59 commit 49ec07b

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

DEVELOPMENT.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,29 @@ When enabled by default, this also works with editor plugins like
7777
[vim-fugitive]. See `git help blame` and `git help config` for more details.
7878

7979
[vim-fugitive]: https://github.com/tpope/vim-fugitive
80+
81+
### Debugging UI Tests Locally
82+
83+
Our UI tests (e.g., //tensorboard/components/vz_sorting/test) use HTML import
84+
which is now deprecated from all browsers (Chrome 79- had the native support)
85+
and is run without any polyfills. In order to debug tests, you may want to run a
86+
a Chromium used by our CI that supports HTML import. It can be found in
87+
`./bazel-bin/third_party/chromium/chromium.out` (exact path to binary will
88+
differ by OS you are on; for Linux, the full path is
89+
`./bazel-bin/third_party/chromium/chromium.out/chrome-linux/chrome`).
90+
91+
For example of the vz_sorting test,
92+
93+
```sh
94+
# Run the debug instance of the test. It should run a web server at a dynamic
95+
# port.
96+
bazel run tensorboard/components/vz_sorting/test:test_web_library
97+
98+
# In another tab:
99+
100+
# Fetch, if missing, the Chromium
101+
bazel build third_party/chromium
102+
./bazel-bin/third_party/chromium/chromium.out/chrome-linux/chrome
103+
104+
# Lastly, put the address returnd by the web server into the Chromium.
105+
```

0 commit comments

Comments
 (0)