Skip to content
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

docs(chromium-web-tests): add debugging tips #11684

Merged
merged 2 commits into from
Jan 11, 2021
Merged

Conversation

paulirish
Copy link
Member

Summary

Related Issues/PRs


* Want logs from Lighthouse? Add `log.log('status', '**** hello test output ' + JSON.stringify({obj}));` which will be visible in the `lighthouse-successful-run.js` output thanks to `LighthouseTestRunner.addStatusListener`.
* Want logs from test files? Adding `--driver-logging --no-retry-failures` to the `run_web_tests.py` command in `web-test-server.sh` will print to terminal.
* Want logs from the inspected page? Add `testRunner.setDumpConsoleMessages(true);` to a test file. (also, [beware](https://source.chromium.org/chromium/chromium/src/+/master:content/web_test/renderer/web_view_test_proxy.cc;l=125-129;drc=437e5d9a05535b9e2cd7b983f78b23ebc3d92b3f) w/e this is about)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

niiiiice

@connorjclark connorjclark changed the title docs(chromium_web_tests): add debugging tips docs(chromium-web-tests): add debugging tips Nov 19, 2020
Copy link
Collaborator

@connorjclark connorjclark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

(changed title from _ to - because git log --grep '-' was more convincing than git log --grep '_')

### Debugging

* Want logs from Lighthouse? Add `log.log('status', '**** hello test output ' + JSON.stringify({obj}));` which will be visible in the `lighthouse-successful-run.js` output thanks to `LighthouseTestRunner.addStatusListener`.
* Want logs from test files? Adding `--driver-logging --no-retry-failures` to the `run_web_tests.py` command in `web-test-server.sh` will print to terminal.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We pass all args ($*) through to this command so this can just be yarn test-devtools --driver-logging --no-retry-failures (haven't tested)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true. changed.

@connorjclark connorjclark merged commit 71c4fd4 into master Jan 11, 2021
@connorjclark connorjclark deleted the paulirish-patch-1 branch January 11, 2021 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants