Skip to main content
Integrate Stably tests into your GitLab CI/CD pipeline using our API. Configure your .gitlab-ci.yml to trigger tests and poll for completion automatically.

Setup Instructions

1

Get API Key

Go to the settings page on the Web UI to get your API key.
2

Set Environment Variables

In your GitLab project, go to “Settings” > “CI/CD” > “Variables” and add:
  • TEST_SUITE_ID: Your Stably test suite ID
  • STABLY_API_KEY: Your Stably API key (mark as protected and masked)
3

Configure Pipeline

Add the Stably test job to your .gitlab-ci.yml file.

Basic Configuration

Add this to your .gitlab-ci.yml:

Environment Variables

Set these variables in your GitLab project (Settings > CI/CD > Variables):
  • TEST_SUITE_ID: Your Stably test suite ID
  • STABLY_API_KEY: Your Stably API key (store as CI/CD variable, mark as protected and masked)
For multiple test suites, you can create additional variables:
  • SMOKE_TEST_SUITE_ID: ID for smoke tests
  • REGRESSION_TEST_SUITE_ID: ID for regression tests

API Documentation

For complete API reference, including all available endpoints, request/response schemas, and examples, visit our API Documentation.

Best Practices

  • Use secrets: Store your API key as a GitLab CI/CD variable marked as “protected” and “masked”
  • Set timeouts: Add appropriate timeouts to prevent jobs from running indefinitely
  • Handle errors: Include proper error handling in your scripts
  • Parallel execution: Run multiple test suites in parallel for faster feedback
  • Conditional execution: Use GitLab’s rules to run tests only when needed