GitLab CI/CD
Learn how to run Verex AI test suites using GitLab CI/CD.
Overview
Verex integrates with GitLab CI/CD to help you automatically run test suites as part of your CI/CD workflows. This integration makes it easy to trigger tests, wait for completion, and surface results directly in your pipeline.
Features
- Run Verex test suites from any GitLab CI/CD pipeline
- Automatic polling and real-time test monitoring
- Output test result summaries and metadata
- Pass dynamic URLs to target specific environments
- Debug mode for troubleshooting
Quick Start
1. Add to Your GitLab CI/CD Pipeline
2. Set Up Your API Key
- Create your API Key in the Verex Dashboard under Settings > API Keys
- Add it to your GitLab project's CI/CD variables as
VEREX_API_KEY
Complete Example
Dynamic Base URL
To run tests against a dynamic environment (e.g. your current deploy preview), you can pass a custom base URL:
This value replaces any {{base_url}}
placeholder used in your Verex test suite.
Variables
Name | Description | Required | Default |
---|---|---|---|
VEREX_API_KEY | API key for authentication | Yes | – |
VEREX_TEST_SUITE | Test suite ID to execute | Yes | – |
VEREX_TEST_BASE_URL | Base URL for the tests (e.g. https://staging.yourdomain.com) | No | – |
VEREX_API_BASE_URL | Base URL for the API | No | https://verex.ai/api |
VEREX_MAX_POLL_ATTEMPTS | Maximum number of polling attempts | No | 60 |
VEREX_POLL_INTERVAL_SECONDS | Seconds to wait between polling attempts | No | 10 |
VEREX_DEBUG | Enable debug mode | No | false |
Output Variables
Name | Description |
---|---|
VEREX_TEST_SUITE_RUN_ID | ID of the test suite run |
VEREX_TEST_SUITE_RUN_STATUS | Status of the test suite run |
VEREX_TEST_SUITE_LINK | Link to the test suite |
VEREX_TEST_SUITE_RUN_LINK | Link to the test suite run |
VEREX_TOTAL_TESTS | Total number of tests executed |
VEREX_PASSED_TESTS | Number of tests that passed |
VEREX_FAILED_TESTS | Number of tests that failed |
VEREX_TEST_DURATION | Total duration of the test run in seconds |
Requirements
- A Verex account
- A valid API Key with permissions to run test suites
- GitLab CI/CD runner with Node.js support
Troubleshooting
Enable VEREX_DEBUG: 'true'
to view detailed logs in case of:
- Invalid API keys
- Test suite not found
- Timeout issues
- Connectivity problems
Resources
Need help? Contact Support