Article · 5 min read
How to Set Up CI/CD Pipelines with AegisRunner
AegisRunner Team · February 2, 2026
yamlname: AegisRunner Testson: pull_request: branches: [main, develop]jobs: test: runs-on: ubuntu-latest steps: - name: Trigger AegisRunner Tests run: | RESPONSE=$(curl -s -X POST \ -H "Authorization: Bearer $\{\{ secrets.AEGIS_TRIGGER_TOKEN \}\}" \ -H "Content-Type: application/json" \ -d '\{ "suiteIds": ["your-suite-id"], "waitForCompletion": true, "timeout": 300 \}' \ https://aegisrunner.com/api/v1/ci/trigger) STATUS=$(echo $RESPONSE | jq -r '.status') if [ "$STATUS" != "passed" ]; then echo "Tests failed! Status: $STATUS" echo $RESPONSE | jq . exit 1 fi echo "All tests passed!"## GitLab CIFor GitLab CI, add the following to your .gitlab-ci.yml:yamlaegisrunner-tests: stage: test image: curlimages/curl:latest script: - | RESPONSE=$(curl -s -X POST \ -H "Authorization: Bearer $AEGIS_TRIGGER_TOKEN" \ -H "Content-Type: application/json" \ -d '\{"suiteIds": ["your-suite-id"], "waitForCompletion": true\}' \ https://aegisrunner.com/api/v1/ci/trigger) STATUS=$(echo $RESPONSE | jq -r '.status') [ "$STATUS" = "passed" ] || exit 1 only: - merge_requests - main## JenkinsFor Jenkins, create a pipeline stage:groovypipeline \{ agent any stages \{ stage('AegisRunner Tests') \{ steps \{ script \{ def response = httpRequest( httpMode: 'POST', url: 'https://aegisrunner.com/api/v1/ci/trigger', customHeaders: [ [name: 'Authorization', value: "Bearer $\{env.AEGIS_TRIGGER_TOKEN\}"], [name: 'Content-Type', value: 'application/json'] ], requestBody: '\{ "suiteIds": ["your-suite-id"], "waitForCompletion": true \}' ) def result = readJSON(text: response.content) if (result.status != 'passed') \{ error("AegisRunner tests failed: $\{result.status\}") \} \} \} \} \}\}## API-Based IntegrationFor custom CI/CD systems or scripts, use the AegisRunner API directly:bash# Trigger a test runcurl -X POST \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '\{"suiteIds": ["suite-1", "suite-2"]\}' \ https://aegisrunner.com/api/v1/ci/triggerThe API returns a run ID that you can poll for completion status, or use waitForCompletion: true to block until tests finish.## Best Practices for CI/CD Testing### 1. Use Separate Test EnvironmentsRun tests against a staging environment that mirrors production. This avoids polluting production data with test interactions.### 2. Parallelize Test SuitesIf you have multiple test suites, trigger them in parallel to reduce total pipeline time. AegisRunner supports concurrent suite execution.### 3. Set Appropriate TimeoutsVisual regression tests may take longer than unit tests. Set timeouts that account for page load times, screenshot capture, and comparison processing.### 4. Handle Flaky TestsNetwork issues or timing-dependent tests can cause intermittent failures. Configure retries for flaky tests and track flakiness rates over time.### 5. Archive Test ArtifactsStore screenshots, diff images, and test reports as CI/CD artifacts for debugging. AegisRunner provides downloadable reports for every run.---Ready to add automated testing to your pipeline? Set up AegisRunner CI/CD integration and catch bugs before they ship.