GitHub Actions
Run Automate from a GitHub Actions workflow with the access key in repository secrets.
Store the access key
- Repository → Settings → Secrets and variables → Actions → New repository secret.
- Name
TESTKASE_ACCESS_KEY, value = your TestKase access key. Save.
Add the job
Save this as .github/workflows/testkase.yml in your repository, replacing [email protected] with your TestKase username:
One-time setup: run this locally and commit the result, before the pipeline needs it.
npm install --save-dev @testkase/playwright-reporterThe CI job only installs what's already committed — it can't add packages on its own. Skip this and the job either fails (no internet access) or runs slow (fetches the package fresh every time).
name: TestKase Automate
on: [push, pull_request]
jobs:
e2e:
runs-on: ubuntu-latest
env:
TK_USERNAME: [email protected]
ACCESS_KEY: ${{ secrets.TESTKASE_ACCESS_KEY }}
TESTKASE_BUILD: ci-${{ github.run_id }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 20 }
- run: npm ci
# testkase.yml: build: ${TESTKASE_BUILD} (env interpolation is supported)
- run: npx testkase-playwright testname: TestKase Automate
on: [push, pull_request]
jobs:
e2e:
runs-on: ubuntu-latest
env:
TK_USERNAME: [email protected]
ACCESS_KEY: ${{ secrets.TESTKASE_ACCESS_KEY }}
TESTKASE_BUILD: ci-${{ github.run_id }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 20 }
- run: npm ci
- run: npm test # your Selenium suite — see the note belowname: TestKase Automate
on: [push, pull_request]
jobs:
e2e:
runs-on: ubuntu-latest
env:
TK_USERNAME: [email protected]
ACCESS_KEY: ${{ secrets.TESTKASE_ACCESS_KEY }}
TESTKASE_BUILD: ci-${{ github.run_id }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 20 }
- run: npm ci
- run: npm test # your Appium suite — see the note belowPlaywright runs through the testkase-playwright wrapper, which reads these environment variables for you. Selenium and Appium have no wrapper — your existing test code builds the Hub URL from TK_USERNAME / ACCESS_KEY itself, exactly as it already does outside CI. See Selenium: point your suite at TestKase and Appium: getting started.
What to check
| Build name | ci-${{ github.run_id }} — sessions group under it on the Automate dashboard |
| Secret | read from ${{ secrets.TESTKASE_ACCESS_KEY }} into ACCESS_KEY; never in the repository |
| Tunnel | add npx testkase-tunnel --token "$ACCESS_KEY" & before the test step if the tests open a URL the farm can't reach |
Run the pipeline once. Within a few seconds the session appears on Automate → Sessions with the build name above; the job goes red if any test fails.
