CI/CD Integration
The aeth CLI is designed for seamless integration with any CI/CD platform.
Prerequisites
- Aethrix CLI installed on the build agent (or Docker image)
- Test automation project file (
.aprj) committed to the repository - Valid Aethrix license installed or provided via license file
General Pattern
aeth run <project-file> \
--env <environment> \
--key <encryption-key> \
--output ./test-results \
--junit
Exit code 0 means the run finished with every test case passing. A non-zero code means it did not:
1 failing test cases, 2 the --fail-on security gate, 3 bad arguments, 4 the command itself
failing, 5 refused credentials — see the exit-code table in Command line.
GitHub Actions
name: API Tests
on: [push, pull_request]
jobs:
api-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Aethrix CLI
run: |
# Download and install the aeth CLI
curl -L https://aethrix.fr/download/cli/linux-x64.tar.gz | tar -xz
sudo mv aeth /usr/local/bin/
- name: Install license
run: aeth license ${{ secrets.AETHRIX_LICENSE_FILE }}
- name: Run API Tests
env:
AETHRIX_KEY: ${{ secrets.AETHRIX_KEY }}
run: |
aeth run ./tests/MyProject.aprj \
--env staging \
--key "$AETHRIX_KEY" \
--output ./test-results \
--junit
- name: Publish Test Results
uses: mikepenz/action-junit-report@v4
if: always()
with:
report_paths: './test-results/**/junit-report.xml'
Azure DevOps
- task: CmdLine@2
displayName: 'Run Aethrix Tests'
inputs:
script: |
aeth run $(Build.SourcesDirectory)/tests/MyProject.aprj \
--env $(Environment) \
--key $(AethrixKey) \
--output $(Build.ArtifactStagingDirectory)/test-results \
--junit
- task: PublishTestResults@2
displayName: 'Publish Test Results'
condition: always()
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '$(Build.ArtifactStagingDirectory)/test-results/**/junit-report.xml'
Jenkins
pipeline {
agent any
stages {
stage('API Tests') {
steps {
sh """
aeth run tests/MyProject.aprj \
--env staging \
--key ${AETHRIX_KEY} \
--output ./test-results \
--junit
"""
}
post {
always {
junit 'test-results/**/junit-report.xml'
}
}
}
}
}
Secrets Management
Never pass the encryption key inline. Use:
- CI/CD platform secrets (e.g., GitHub Secrets, Azure Key Vault)
- Environment variable:
aeth run project.aprj --key "$AETHRIX_KEY" aeth encryptto encrypt secrets at rest:aeth encrypt "MyPassword" --key "$(cat key.b64)"
Environment Override from File
For environments that change per deployment (e.g., dynamic base URLs in preview deployments), use --env-file:
aeth run project.aprj \
--env-file ./env-override.json \
--env-password "$ENV_PASSWORD" \
--output ./reports