TestKase Docs
AutomationCI/CD Platforms

GitHub Actions

Set up TestKase test reporting in your GitHub Actions workflows.

GitHub Actions

GitHub ActionsGitHub Actions

Setup Steps

  1. Go to your GitHub repo → SettingsSecrets and variablesActions. Add TESTKASE_PAT.
  2. Create the workflow file .github/workflows/testkase-report.yml.
  3. Update --project-id, --org-id, --cycle-id, and --format to match your project.
  4. Commit and push. The reporting step runs after your tests complete.

Pipeline Template

name: Test & Report to TestKase

on:
  push:
    branches: [main, develop]
  pull_request:
    branches: [main]

jobs:
  test-and-report:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm ci
      - name: Run tests
        run: npm test -- --reporter=junit --outputFile=test-results/junit.xml
        continue-on-error: true
      - name: Report results to TestKase
        if: always()
        run: |
          npx @testkase/reporter report \
            --token ${{ secrets.TESTKASE_PAT }} \
            --project-id PRJ-1 \
            --org-id 1173 \
            --cycle-id TCYCLE-5 \
            --format junit \
            --results-file test-results/junit.xml \
            --build-id "${{ github.run_number }}"

--cycle-id is optional. If not provided, results are reported to TCYCLE-1 — the master test cycle for the project.