Bitbucket Pipelines
Run Automate from Bitbucket Pipelines with the access key as a secured repository variable.
Store the access key
- Repository → Repository settings → Pipelines → Repository variables.
- Name
TESTKASE_ACCESS_KEY, value = your access key, tick Secured. Add.
Add the job
Save this as bitbucket-pipelines.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).
image: node:20
pipelines:
default:
- step:
name: E2E on TestKase
script:
- export TK_USERNAME="[email protected]"
- export ACCESS_KEY="$TESTKASE_ACCESS_KEY" # secured repository variable
- export TESTKASE_BUILD="ci-${BITBUCKET_BUILD_NUMBER}"
- npm ci
- npx testkase-playwright testimage: node:20
pipelines:
default:
- step:
name: E2E on TestKase
script:
- export TK_USERNAME="[email protected]"
- export ACCESS_KEY="$TESTKASE_ACCESS_KEY" # secured repository variable
- export TESTKASE_BUILD="ci-${BITBUCKET_BUILD_NUMBER}"
- npm ci
- npm test # your Selenium suite — see the note belowimage: node:20
pipelines:
default:
- step:
name: E2E on TestKase
script:
- export TK_USERNAME="[email protected]"
- export ACCESS_KEY="$TESTKASE_ACCESS_KEY" # secured repository variable
- export TESTKASE_BUILD="ci-${BITBUCKET_BUILD_NUMBER}"
- npm ci
- 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-${BITBUCKET_BUILD_NUMBER} — sessions group under it on the Automate dashboard |
| Secret | read from $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.
