TestKase
TestKase
|Docs
Organization & AccountIntegrationsCI/CD

CircleCI

Run Automate from a CircleCI job with the access key as a project environment variable or context.

Store the access key

  1. Project → Project Settings → Environment Variables → Add Environment Variable (or add it to a Context shared across projects).
  2. Name TESTKASE_ACCESS_KEY, value = your access key.

Add the job

Save this as .circleci/config.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-reporter

The 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).

version: 2.1
jobs:
  e2e:
    docker:
      - image: cimg/node:20.11
    environment:
      TK_USERNAME: [email protected]
    steps:
      - checkout
      - run: npm ci
      - run:
          name: E2E on TestKase
          command: |
            export ACCESS_KEY="$TESTKASE_ACCESS_KEY"     # project env var or context
            export TESTKASE_BUILD="ci-${CIRCLE_BUILD_NUM}"
            npx testkase-playwright test
workflows:
  test:
    jobs: [e2e]
version: 2.1
jobs:
  e2e:
    docker:
      - image: cimg/node:20.11
    environment:
      TK_USERNAME: [email protected]
    steps:
      - checkout
      - run: npm ci
      - run:
          name: E2E on TestKase
          command: |
            export ACCESS_KEY="$TESTKASE_ACCESS_KEY"     # project env var or context
            export TESTKASE_BUILD="ci-${CIRCLE_BUILD_NUM}"
            npm test   # your Selenium suite — see the note below
workflows:
  test:
    jobs: [e2e]
version: 2.1
jobs:
  e2e:
    docker:
      - image: cimg/node:20.11
    environment:
      TK_USERNAME: [email protected]
    steps:
      - checkout
      - run: npm ci
      - run:
          name: E2E on TestKase
          command: |
            export ACCESS_KEY="$TESTKASE_ACCESS_KEY"     # project env var or context
            export TESTKASE_BUILD="ci-${CIRCLE_BUILD_NUM}"
            npm test   # your Appium suite — see the note below
workflows:
  test:
    jobs: [e2e]

Playwright 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 nameci-${CIRCLE_BUILD_NUM} — sessions group under it on the Automate dashboard
Secretread from $TESTKASE_ACCESS_KEY into ACCESS_KEY; never in the repository
Tunneladd 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.