new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Playwright · all subjects

traces-debugging

5 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Use trace viewer for CI failures instead of videos and screenshots

For CI failures, use the Playwright trace viewer instead of videos and screenshots. The trace viewer gives a full trace of your tests as a local Progressive Web App (PWA) that can easily be shared. With the trace viewer you can view the timeline, inspect DOM snapshots for each action using dev tools, and view network requests.

Traces configured to run on first retry of failed test on CI

Traces are configured in the Playwright config file and are set to run on CI on the first retry of a failed test. Do not set traces to run on every test as it is very performance heavy. However, you can run a trace locally when developing with the --trace flag.

Run tests locally with trace enabled

npm: npx playwright test --trace on yarn: yarn playwright test --trace on pnpm: pnpm exec playwright test --trace on

View traces in HTML report

Once traces are recorded for each test with --trace on, they can be viewed directly from the HTML report. Run 'npx playwright show-report' to open the HTML report and view traces. Traces can be opened by clicking on the icon next to the test file name or by opening each test report and scrolling down to the traces section.

Show HTML report command

npm: npx playwright show-report yarn: yarn playwright show-report pnpm: pnpm exec playwright show-report

Give your agent this brain