Open source: Score Playwright test quality with playwright-score (deterministic sqs-v1 scorer, MIT).
GitHubQA Guardian CLI
Run automated tests from the command line and plug them directly into your CI/CD workflows.
Quick Start
Set an API key and run flows by tag. Get the CLI.
Set your API key
Copy your environment API key from the QA Guardian variables.
export QAGUARDIAN_API_KEY=your-api-key-hereRun your tests
Use `npx` to trigger flows with the tags you want.
npx qaguardian --tags cicdOne-line version
Useful for quick tests and examples.
QAGUARDIAN_API_KEY=your-api-key-here npx qaguardian --tags cicdCLI Guide
The most useful options for local runs and automation.
--tags
Run flows that match one or more tags.
npx qaguardian --tags auth,smoke--exclude-tags
Exclude flows with specific tags.
npx qaguardian --tags regression --exclude-tags slow,flaky--all
Run all flows. Combine with --exclude-tags to filter.
npx qaguardian --all --exclude-tags auth--match-mode
Use any (default) or all for tag matching.
npx qaguardian --tags auth,login,ui --match-mode all--ref
Tests in your own repo: run the suite as it exists at a branch, tag or commit (e.g. the PR head). Guardian posts a "Guardian release gate" commit status on it.
npx qaguardian --all --ref $GITHUB_SHA--no-wait
Trigger the run and exit immediately.
npx qaguardian --tags smoke --no-wait--notify
Send completion notifications to a supported integration.
npx qaguardian --tags smoke --notify slack--webhook-url
Send completion notifications to a custom webhook.
npx qaguardian --tags regression --webhook-url https://my-service.com/webhookTests in your own repository
Guardian can keep your suite in your GitHub or GitLab repository instead of on our platform. Runs read it from your default branch; every change we make arrives as a pull request.
1. Connect
In Settings › Test source choose Your repository, install the Guardian GitHub App on the repo (or paste a repository-scoped token for GitLab), and pick the folder — the default is e2e/guardian. Click Verify access.
2. Seed
Open bootstrap PR commits the current suite, a runnable playwright.config.ts, an .env.example (variable names only; values stay in Guardian) and CI templates. Merge it once.
3. Gate pull requests
Add the workflow from ci/. Each PR runs the suite at its head commit and receives a Guardian release gate commit status. Mark it required and a PR cannot merge until every flow passes.
Layout
e2e/guardian/
specs/<flow-name>/*.spec.ts one folder per flow, plain @playwright/test
src/<domain>/*.ts shared page objects and helpers
flows/ddt.json flow manifest
playwright.config.ts npx playwright test works locally
.env.example variable names Guardian injects at run time
ci/ GitHub Actions / GitLab CI templatesHow changes flow
- Guardian edits land on
guardian/updateswith one open pull request; your default branch is never pushed to. - Your own edits to the default branch are picked up on the next run, and synced into Guardian automatically via the push webhook.
- Access is scoped to that one repository: contents, pull requests and commit statuses. Test credentials are never committed.
- Disconnect at any time. The suite keeps running with
npx playwright test.
CI/CD Examples
Simple starter examples for GitHub Actions and GitLab CI.
GitHub Actions
Store `QAGUARDIAN_API_KEY` in GitHub Secrets.
name: QA Guardian Tests
on:
workflow_dispatch:
jobs:
qaguardian-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Run QA Guardian
env:
QAGUARDIAN_API_KEY: ${{ secrets.QAGUARDIAN_API_KEY }}
run: npx qaguardian --tags cicdGitLab CI
Store `QAGUARDIAN_API_KEY` in GitLab CI/CD variables.
acme-cicd:
stage: test
image: node:20-slim
script:
- export QAGUARDIAN_API_KEY=$QAGUARDIAN_API_KEY
- npx qaguardian --tags cicd
rules:
- when: manualLocal example
export QAGUARDIAN_API_KEY=your-api-key-here
npx qaguardian --tags cicdReady to connect your pipeline?
Our team sets up the CLI integration for you as part of onboarding. Book a demo and we'll show you how it works on your stack.