Skip to main content
Use the official QA.tech GitHub Action to trigger test runs from your workflows. This gives you full control over which test plans run, when they run, and which environments to test.
Looking for AI-powered testing? The GitHub App provides automatic test creation and PR reviews. This page covers the GitHub Action for API-driven testing.

Setup

1

Configure Secrets

Add secrets to your GitHub repository (Settings → Secrets and variables → Actions):
  • QATECH_API_TOKEN - Your QA.tech API token
  • QATECH_PROJECT_ID - Your QA.tech project ID
Find these in your project settings.
2

Create Workflow

Create .github/workflows/qatech.yml:
name: QA.tech Tests
on:
  push:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: QAdottech/run-action@v2
        with:
          project_id: ${{ secrets.QATECH_PROJECT_ID }}
          api_token: ${{ secrets.QATECH_API_TOKEN }}
          blocking: true

Implementation Patterns

Run on Pull Requests

name: PR Tests
on:
  pull_request:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: QAdottech/run-action@v2
        with:
          project_id: ${{ secrets.QATECH_PROJECT_ID }}
          api_token: ${{ secrets.QATECH_API_TOKEN }}
          test_plan_short_id: 'smoke-tests'
          blocking: true

Test Preview Deployments

name: Test Preview
on:
  pull_request:
    types: [opened, synchronize]

jobs:
  deploy:
    runs-on: ubuntu-latest
    outputs:
      preview_url: ${{ steps.deploy.outputs.url }}
    steps:
      - name: Deploy to Vercel
        id: deploy
        run: |
          # Your deployment logic
          echo "url=https://preview-${{ github.event.pull_request.number }}.vercel.app" >> $GITHUB_OUTPUT

  test:
    needs: deploy
    runs-on: ubuntu-latest
    steps:
      - uses: QAdottech/run-action@v2
        with:
          project_id: ${{ secrets.QATECH_PROJECT_ID }}
          api_token: ${{ secrets.QATECH_API_TOKEN }}
          test_plan_short_id: 'regression-suite'
          blocking: true
          applications_config: |
            {
              "applications": {
                "frontend-app": {
                  "environment": {
                    "url": "${{ needs.deploy.outputs.preview_url }}",
                    "name": "PR-${{ github.event.pull_request.number }}"
                  }
                }
              }
            }

Scheduled Testing

name: Nightly Tests
on:
  schedule:
    - cron: '0 2 * * *'  # Daily at 2 AM UTC

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: QAdottech/run-action@v2
        with:
          project_id: ${{ secrets.QATECH_PROJECT_ID }}
          api_token: ${{ secrets.QATECH_API_TOKEN }}
          test_plan_short_id: 'full-regression'
          blocking: false

Use Action Outputs

- uses: QAdottech/run-action@v2
  id: qatech
  with:
    project_id: ${{ secrets.QATECH_PROJECT_ID }}
    api_token: ${{ secrets.QATECH_API_TOKEN }}
    blocking: true

- name: Check Results
  if: steps.qatech.outputs.run_result == 'FAILED'
  run: echo "Tests failed! See ${{ steps.qatech.outputs.run_url }}"

Action Reference

Inputs

InputDescriptionRequiredDefault
project_idYour QA.tech project IDYes-
api_tokenQA.tech API tokenYes-
test_plan_short_idTest plan short ID to runNoAll tests
blockingWait for test results before completingNofalse
applications_configJSON with application environment overridesNo-
api_urlCustom API URLNohttps://app.qa.tech

Outputs

OutputDescription
run_createdWhether the test run was created successfully
run_short_idThe short ID of the run
run_urlThe URL of the run
run_statusFinal status (COMPLETED, ERROR, CANCELLED) - only when blocking: true
run_resultTest result (PASSED, FAILED, SKIPPED) - only when blocking: true

Direct API Alternative

If you prefer curl over the Action, use the Start Run API to trigger runs and the Run Status API for polling in non-blocking workflows.