tl;dr -- see subject line

Sometimes web_tests fail on the CQ bots but not when running locally, and
when that happens it's very difficult to debug. To make it a bit easier,
you can now generate chrome traces for web_tests and wpt_tests running on
the CQ bots and download the resulting trace files.

1. Create a CL with (or add to an existing CL) a diff like this
<https://chromium-review.googlesource.com/c/chromium/src/+/5026618>,
listing the tests you want to profile.

2. Upload the CL and trigger try jobs.

3. On the build result page, expand the "archive results for ..." step and
click on the web_test_results_link:

[image: image.png]

4. On the web_test_results page, expand the entry for the test case; you
should see a "trace" link; click on it to download the trace file:

[image: image.png]
5. Profit!


Q: How is this different from the pre-existing --enable-tracing flag?
A: The results of --enable-tracing were not previously archived with
web_test_results.
A: --enable-tracing can't be specified on a per-test-case basis, and
enabling it for all web_tests would destroy the bot.
A: --enable-tracing forces a content_shell restart after every test case.
That makes the tests extremely slow, and it also suppresses any errors
caused by running tests serially in a single content_shell (the default
behavior, and historically a significant source of bugs).

Q: What trace categories are enabled?
A: "*", i.e., all the basic non-huge ones.

Q: Is this documented anywhere else?
A: I'm working on adding it to the docs
<https://chromium.googlesource.com/chromium/src/+/HEAD/docs/testing/web_tests.md>

-- 
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAHOQ7J_58c99-C4LYWuPwaC8JZM4BuguAWw3A2obC0yTQiSk1g%40mail.gmail.com.

Reply via email to