CI/CD Integration
Running npm run report on a scheduled basis is the recommended way to keep SeaLights up to date. Use environment variables instead of config.json to configure the tool in CI/CD pipelines — this avoids storing credentials in your repository.
Environment Variables
Set these variables in your CI/CD secrets store:
SL_TOKEN
SeaLights agent token
SL_QTEST_TOKEN
qTest bearer token
SL_QTEST_URL
Your qTest instance URL
SL_PROJECT
Default project name
SL_DAYS
Days to look back (e.g. 1 for daily runs)
HTTPS_PROXY
Corporate proxy URL (if required)
A config.json with testDesignMapping and userLabMapping is still required on the runner. Store it as a CI/CD secret file or generate it during pipeline setup.
GitHub Actions
name: SeaLights qTest Daily Report
on:
schedule:
- cron: '0 6 * * *' # Daily at 6:00 AM UTC
workflow_dispatch: # Allow manual trigger
jobs:
report:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Write config file
run: echo '${{ secrets.QTEST_CONFIG_JSON }}' > config.json
- name: Run report
run: npm run report
env:
SL_TOKEN: ${{ secrets.SEALIGHTS_TOKEN }}
SL_QTEST_TOKEN: ${{ secrets.QTEST_TOKEN }}
SL_QTEST_URL: ${{ vars.QTEST_URL }}
SL_PROJECT: ${{ vars.PROJECT_NAME }}
SL_DAYS: 1GitLab CI
Schedule this job from CI/CD → Schedules in the GitLab project settings.
Jenkins
Store credentials in Jenkins Credentials Manager. Use a Secret file credential for the full config.json.
Behind a Corporate Proxy
Add the proxy environment variable to your pipeline environment:
Scheduling Recommendations
Unlike reporting (which runs automatically on a schedule), the recommendations command is interactive by design — it requires human decisions at each step. It is best run manually before a planned test execution cycle.
If you want to automate recommendations (for fully automated test suites), contact SeaLights support to discuss non-interactive options for your use case.
Tips
For daily incremental reporting, set SL_DAYS=1. For weekly runs, use SL_DAYS=7.
Last updated
Was this helpful?

