@sentinelqa/playwright
v0.1.7
Published
Playwright config wrapper and reporter for SentinelQA
Maintainers
Readme
@sentinelqa/playwright
Playwright config wrapper and reporter for SentinelQA.
Install
npm i -D @sentinelqa/playwrightUsage
import { defineConfig } from "@playwright/test";
import { withSentinel } from "@sentinelqa/playwright";
export default withSentinel(
defineConfig({
reporter: [
["line"],
["json", { outputFile: "test-results/report.json" }],
["html", { outputFolder: "playwright-report", open: "never" }]
],
outputDir: "test-results",
use: {
trace: "retain-on-failure",
screenshot: "only-on-failure",
video: "retain-on-failure"
}
}),
{
project: "my-app"
}
);Set your ingest token in CI:
SENTINEL_TOKEN=your_project_ingest_tokenOptional local upload guardrail:
SENTINEL_UPLOAD_LOCAL=1Then keep your existing Playwright command:
npx playwright testWhat it does
- Preserves existing Playwright JSON and HTML report paths if you already configured them
- Injects JSON and HTML reporters only when they are missing
- Uses your configured
outputDirfor test results when present - Uploads the detected report and test result paths to Sentinel after the run
- Preserves the same Sentinel link output as the uploader CLI
Notes
- Uploads run only when
SENTINEL_TOKENis set - CI uploads work on GitHub Actions, GitLab CI, and CircleCI
- Local uploads are disabled by default and require
SENTINEL_UPLOAD_LOCAL=1
