Playwright trace aggregation and HTML dashboard generator.
Scans a directory tree for *.zip trace files produced by testing.pw/with-pw
and emits a self-contained index.html dashboard that:
Usage from the REPL or as a -main entry point:
(require '[testing.pw-report :as rep]) (rep/generate-report) ; default: scans target/pw-traces (rep/generate-report {:traces-dir "target/pw-traces" :output-dir "target/pw-traces" :project "My Project"})
CLI alias (see deps.edn :pw-report): clojure -M:pw-report
Playwright trace aggregation and HTML dashboard generator.
Scans a directory tree for *.zip trace files produced by `testing.pw/with-pw`
and emits a self-contained `index.html` dashboard that:
- Lists every trace with its test name, timestamp, and file size.
- Provides direct links to open each trace in the official online viewer
(https://trace.playwright.dev) — works when you serve the traces over HTTP.
- Shows a local CLI command to open each trace with the Playwright CLI.
- Includes an aggregated status summary (total / by date).
- Copies the Playwright Trace Viewer static assets into <output-dir>/trace/
so that the embedded offline viewer links work immediately.
Usage from the REPL or as a -main entry point:
(require '[testing.pw-report :as rep])
(rep/generate-report) ; default: scans target/pw-traces
(rep/generate-report {:traces-dir "target/pw-traces"
:output-dir "target/pw-traces"
:project "My Project"})
CLI alias (see deps.edn :pw-report):
clojure -M:pw-report
(-main & _args)CLI entry point. Reads options from system properties: -Dpw.outputDirectory=target/pw-traces -Dpw.project.name=My Project
CLI entry point. Reads options from system properties: -Dpw.outputDirectory=target/pw-traces -Dpw.project.name=My Project
(generate-report)(generate-report {:keys [traces-dir output-dir project]})Scan traces-dir for *.zip Playwright trace files and write an HTML
aggregate dashboard to output-dir/index.html.
Options (all optional): :traces-dir — directory to scan for .zip files (default: system property pw.outputDirectory or 'target/pw-traces') :output-dir — where to write index.html (default: same as traces-dir) :project — project name shown in the report header (default: system property pw.project.name or 'Playwright Tests')
Returns the java.io.File pointing to the generated index.html.
Scan `traces-dir` for *.zip Playwright trace files and write an HTML
aggregate dashboard to `output-dir`/index.html.
Options (all optional):
:traces-dir — directory to scan for .zip files
(default: system property pw.outputDirectory or 'target/pw-traces')
:output-dir — where to write index.html
(default: same as traces-dir)
:project — project name shown in the report header
(default: system property pw.project.name or 'Playwright Tests')
Returns the java.io.File pointing to the generated index.html.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |