Skip to main content

Overview

This guide explains how to execute test plans in your CI/CD pipeline using the qaby.ai API.

API Endpoint

POST https://qaby.ai/trpc/browser.execute.executeTestPlan

Authentication

You’ll need an API key to authenticate your requests. Create one at https://qaby.ai/settings/api-keys and include it in the x-api-key header.

Basic Usage

cURL Example

curl 'https://qaby.ai/trpc/browser.execute.executeTestPlan' \
  -H "x-api-key: YOUR_API_KEY_HERE" \
  -H 'content-type: application/json' \
  --data-raw '{"json":{"testPlanId":YOUR_TEST_PLAN_ID}}'

Required Parameters

  • testPlanId: The ID of the test plan you want to execute

Getting Your Test Plan ID

To find your test plan ID:
  1. Visit https://qaby.ai/plans
  2. Navigate to the test plan you want to execute
  3. Copy the test plan ID from the URL (e.g., if the URL is https://qaby.ai/plans/YOUR_TEST_PLAN_ID, your test plan ID is YOUR_TEST_PLAN_ID)

CI/CD Integration Examples

GitHub Actions

name: Execute Test Plan
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: Execute Test Plan
        run: |
          curl 'https://qaby.ai/trpc/browser.execute.executeTestPlan' \
            -H "x-api-key: ${{ secrets.QABY_API_KEY }}" \
            -H 'content-type: application/json' \
            --data-raw '{"json":{"testPlanId":${{ vars.TEST_PLAN_ID }}}}'

GitLab CI

execute_tests:
  stage: test
  script:
    - |
      curl 'https://qaby.ai/trpc/browser.execute.executeTestPlan' \
        -H "x-api-key: $QABY_API_KEY" \
        -H 'content-type: application/json' \
        --data-raw '{"json":{"testPlanId":'$TEST_PLAN_ID'}}'
  variables:
    TEST_PLAN_ID: "YOUR_TEST_PLAN_ID"

Environment Variables Setup

Required Environment Variables

  • QABY_API_KEY: Your qaby.ai API key
  • TEST_PLAN_ID: The ID of your test plan

Setting Up Secrets

  1. GitHub: Go to Settings → Secrets and variables → Actions
  2. GitLab: Go to Settings → CI/CD → Variables
I