Configuration
The shiplightConfig() helper in playwright.config.ts handles YAML transpilation and sets up the Shiplight reporter. It returns a partial Playwright config that you spread into defineConfig:
ts
import { defineConfig, shiplightConfig } from "shiplightai";
export default defineConfig({
...shiplightConfig(),
// Your Playwright config (testDir, projects, use, etc.)
});Report
shiplightConfig() automatically enables the Shiplight HTML reporter — no extra configuration needed. After each run, open shiplight-report/index.html to view results with per-step screenshots, videos, and traces.
To customize the report output, override the reporter field in your config:
ts
export default defineConfig({
...shiplightConfig(),
reporter: [
["list"],
[
"shiplightai/reporter",
{
outputFolder: "my-report", // default: "shiplight-report"
open: "on-failure", // "always" | "never" | "on-failure" (default)
},
],
],
});To regenerate the HTML without rerunning tests:
bash
shiplight report # regenerate ./shiplight-report/index.html
shiplight report my-report --open # regenerate and open in browser