PW Trace Analyzer
Where the evidence lives here
playwright.config.ts sets trace: 'on' and video: 'on' for every test, not just retries,
so a trace always exists.
| Artefact | Path |
|---|---|
| Traces | tta-report/traces/trace_<n>.zip and test-results/**/trace.zip |
| Video | tta-report/videos/video_<n>.webm |
| Step screenshots | tta-report/screenshots/ (only when ATTACH_SCREENSHOTS=true) |
| Structured run data | reports/runs/run-<timestamp>.json |
| Readable report | tta-report/index.html, which redirects to the newest run |
npx playwright show-trace tta-report/traces/trace_1.zip
open tta-report/index.html # step timeline, console output, video timestamps
Workflow
- Open the run JSON first. It gives the failing test, its steps, and its error without launching a viewer.
- Find the last passing action before the failure. The bug is usually there, not at the line that threw.
- Check the DOM snapshot at the failing action: was the element absent, detached, covered, or simply not yet rendered?
- Map the failure back to a layer before proposing a fix:
- locator wrong ->
src/pages/*.ts - timing -> the action wrapper in
src/utils/UtilElementLocator.ts(DEFAULT_ACTION_TIMEOUT_MSis 15s) - setup wrong ->
src/fixtures/test-base.ts - config/env ->
@config/env, or.envmissing entirely, which fails at collection
- locator wrong ->
- Cross-read
logs/combined.log. Everyel.*action logs with its scope, so the log names the page object that acted last.
Deliverable
The failing step, the root cause with file and line, the fix, and the command that confirms it.