BugmoleDocs bugmole.com →

Continuous integration

Bugmole runs the same way in CI as it does on your laptop: the bugmole CLI, a project API key, and an exit code CI already knows how to read. There's no CI-specific integration to install — any system that can run a shell step and read an exit code works, including Jenkins and CircleCI.

Provision a key

Create a key for CI once, on the dashboard: open API keys in your account menu, name the key (for example ci), choose the project and choose Create API key. Copy it straight away; it's only shown once.

Store it as BUGMOLE_API_KEY in your CI system's secrets, not in the pipeline file itself.

Install in the job

BUGMOLE_PLAYWRIGHT_INSTALL=true npm install -g bugmole

Installing Bugmole normally downloads the browsers it tests in, but not in CI, where most jobs don't need them. BUGMOLE_PLAYWRIGHT_INSTALL=true asks for them anyway. On a Linux image without browser libraries, also run sudo npx playwright install-deps. Add Edge with npx playwright install msedge if you test on it.

Run it

bugmole --mode run --plan-id <plan> --browsers chromium,firefox,webkit,msedge

--plan-id is the plan Bugmole should execute; get it from Tests in the dashboard, or make one with bugmole --mode plan --journey-id <journey> --actor <role> and commit the spec/ folder it writes to. Running a plan needs no AI model key. Add --devices "iPhone 15,Pixel 7" to include emulated devices, or --base-url <url> to run against a specific environment instead of the plan's own.

The process exits 1 if the run reported anything other than a clean pass — a normal build-step failure your pipeline already understands.

Jenkins

pipeline {
  agent any
  environment {
    BUGMOLE_API_KEY = credentials('bugmole-api-key')
  }
  stages {
    stage('Bugmole') {
      steps {
        sh 'BUGMOLE_PLAYWRIGHT_INSTALL=true npm install -g bugmole'
        sh 'bugmole --mode run --plan-id "$BUGMOLE_PLAN_ID" --browsers chromium,firefox,webkit'
      }
    }
  }
}

CircleCI

jobs:
  bugmole:
    docker:
      - image: cimg/node:22.0
    steps:
      - checkout
      - run: BUGMOLE_PLAYWRIGHT_INSTALL=true npm install -g bugmole
      - run: sudo npx playwright install-deps
      - run: bugmole --mode run --plan-id "$BUGMOLE_PLAN_ID" --browsers chromium,firefox,webkit

Add BUGMOLE_API_KEY and BUGMOLE_PLAN_ID under Project Settings → Environment Variables.

Results

A run from CI writes its evidence (screenshots, video, logs, traces and results) to the project's storage. With the default local storage, that's the artifacts folder in the CI job (runtime.artifacts_dir, or qa/bugmole-runs for --mode suite), so save that folder as a build artifact to keep it.

CI runs don't appear on the dashboard's Runs page: it lists runs started from the dashboard, by a pull request or merge request check, or by a worker running bugmole serve. To see results on the dashboard, start runs there or connect GitHub or GitLab checks. See Discover and debug for what's in a run's evidence.