.gitlab-ci.yml to trigger tests and poll for completion automatically.
Setup Instructions
Get API Key
Go to the settings page on the Web UI to get your API key.
Set Environment Variables
In your GitLab project, go to “Settings” > “CI/CD” > “Variables” and add:
TEST_SUITE_ID: Your Stably test suite IDSTABLY_API_KEY: Your Stably API key (mark as protected and masked)
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 IDSTABLY_API_KEY: Your Stably API key (store as CI/CD variable, mark as protected and masked)
SMOKE_TEST_SUITE_ID: ID for smoke testsREGRESSION_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
rulesto run tests only when needed