QA 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-here

Run your tests

Use `npx` to trigger flows with the tags you want.

npx qaguardian --tags cicd

One-line version

Useful for quick tests and examples.

QAGUARDIAN_API_KEY=your-api-key-here npx qaguardian --tags cicd

CLI 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

--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/webhook

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 cicd

GitLab 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: manual

Local example

export QAGUARDIAN_API_KEY=your-api-key-here
npx qaguardian --tags cicd

Ready 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.