Skip to main content

Using Claude Code, Cursor, or another coding agent? Paste this into your prompt to run cross-browser and real-device tests, debug sessions, and wire up CI on the TestMu AI cloud:
Kane CLI runs headlessly in CI/CD pipelines using credentials passed as environment variables or inline flags. Tests fail fast on assertion errors and return standard exit codes for pipeline control flow.

Common Patterns

These patterns apply to every CI system; the platform-specific recipes below differ only in how they wire up the secrets.
  • Always pass --headless. CI runners have no display.
  • Always set --timeout <seconds>. A hung run cannot be allowed to block the pipeline.
  • Authenticate with --username and --access-key from CI secrets. Do not call kane-cli login in CI — that flow opens a browser for OAuth and will not work on a runner.
  • Load test data with --variables-file <path>. Check the file into your repo (without secret values), or generate it before the step.
  • Check the exit code. 0 passed, 1 failed, 2 error, 3 timeout or cancellation.
Chrome RequirementThe runner spawns Chrome itself, so the CI image must have Chrome available on PATH. If your runner image cannot install Chrome, point Kane CLI at a remote browser with --cdp-endpoint <url> or --ws-endpoint <url> (for example, a wss:// endpoint).

Authentication in CI/CD

Pass credentials directly on the run command using environment variables from your secrets store:
Get your username and access key from the dashboard > Credentials.

Exit Codes

CI/CD Checklist

  • Always use --headless and --agent: no display server in CI
  • Set --timeout: prevents pipeline hangs (e.g. --timeout 300)
  • Set --max-steps: caps run length (e.g. --max-steps 50)
  • Use --variables-file: load test data from a committed config file
  • Store credentials as secrets: never hardcode in pipeline files

Platform Guides

Store LT_USERNAME and LT_ACCESS_KEY as repository secrets under Settings > Secrets and variables > Actions.

Running Multiple Tests

Run several tests and fail the pipeline if any fail:

Variables in CI/CD

Commit a non-secret variables file to your repo, and inject secrets at runtime:
Merge with secrets in your pipeline: