For the complete documentation index, see llms.txt. This page is also available as Markdown.

Gitlab

Discover seamless GitLab integration with BugBug. Run your test automation from GitLab CI/CD pipelines using our CLI.

How to integrate test automation with GitLab?

BugBug can run tests from GitLab CI/CD pipelines using BugBug Command Line Interface.

Use this integration when you want GitLab to run BugBug tests before deployment or as part of merge request checks.

Keep in mind that cloud runs from CI/CD integrations are available on paid plans. More information about pricing can be found here: https://bugbug.io/pricing/

Get your API token and suite ID

  1. Go to the Integrations page.

  2. Open the CLI tab.

  3. Copy your API token or CLI setup command.

  4. Find the suite or test you want to run.

  5. Open its menu and select Run via CLI or webhook.

  6. Copy the test ID or suite ID.

Store the API token as a GitLab CI/CD variable. Do not commit it to the repository.

Example GitLab pipeline

Add a job like this to .gitlab-ci.yml:

bugbug_tests:
  image: node:22
  stage: test
  script:
    - npm install -g @testrevolution/bugbug-cli
    - bugbug config set-token "$BUGBUG_API_TOKEN"
    - bugbug remote run suite <suite-id>
  only:
    - main

Set BUGBUG_API_TOKEN in Settings > CI/CD > Variables in GitLab.

Use Public API or incoming webhooks

Use the Public API if your GitLab pipeline needs advanced control, such as checking run status, stopping runs, or downloading reports.

Use incoming webhooks if GitLab only needs to trigger a run with one POST request.

BugBug does not require a native GitLab OAuth connection for this flow.

Last updated

Was this helpful?