GitHub Integration
Automate your QA process by integrating QA.tech with your GitHub workflows. You can trigger test runs automatically after deployments, on pull requests, or any other GitHub event.
Setup Guide Action Options Examples Direct API Integration
Basic Setup
Create a new workflow file in your repository at .github/workflows/qatech.yml
:
name : QA.tech Tests
on :
push :
branches :
- main
jobs :
test :
runs-on : ubuntu-latest
steps :
- uses : QAdottech/run-action@v2
with :
project_id : ${{ secrets.QATECH_PROJECT_ID }}
api_token : ${{ secrets.QATECH_API_TOKEN }}
blocking : true
This will run all tests in your project whenever code is pushed to the main branch, and the blocking option will make it wait for the result of the run before completing the workflow.
Advanced Setup
For more control, you can:
Run specific test plans by adding their IDs:
- uses : QAdottech/run-action@v2
with :
project_id : ${{ secrets.QATECH_PROJECT_ID }}
api_token : ${{ secrets.QATECH_API_TOKEN }}
test_plan_short_id : 'abc123'
blocking : true
Trigger tests after deployment:
name : 'Deploy and Test'
jobs :
deploy :
# Your deployment steps here
qatech-tests :
needs : deploy
runs-on : ubuntu-latest
steps :
- uses : QAdottech/run-action@v2
with :
project_id : ${{ secrets.QATECH_PROJECT_ID }}
api_token : ${{ secrets.QATECH_API_TOKEN }}
blocking : true
Basic Setup
Create a new workflow file in your repository at .github/workflows/qatech.yml
:
name : QA.tech Tests
on :
push :
branches :
- main
jobs :
test :
runs-on : ubuntu-latest
steps :
- uses : QAdottech/run-action@v2
with :
project_id : ${{ secrets.QATECH_PROJECT_ID }}
api_token : ${{ secrets.QATECH_API_TOKEN }}
blocking : true
This will run all tests in your project whenever code is pushed to the main branch, and the blocking option will make it wait for the result of the run before completing the workflow.
Advanced Setup
For more control, you can:
Run specific test plans by adding their IDs:
- uses : QAdottech/run-action@v2
with :
project_id : ${{ secrets.QATECH_PROJECT_ID }}
api_token : ${{ secrets.QATECH_API_TOKEN }}
test_plan_short_id : 'abc123'
blocking : true
Trigger tests after deployment:
name : 'Deploy and Test'
jobs :
deploy :
# Your deployment steps here
qatech-tests :
needs : deploy
runs-on : ubuntu-latest
steps :
- uses : QAdottech/run-action@v2
with :
project_id : ${{ secrets.QATECH_PROJECT_ID }}
api_token : ${{ secrets.QATECH_API_TOKEN }}
blocking : true
The QA.tech GitHub Action accepts the following inputs:
Input Description Required Default project_id
Your QA.tech project ID Yes - api_token
QA.tech API token Yes - api_url
Custom API URL if needed No https://app.qa.tech test_plan_short_id
Test plan short ID to run No - blocking
Wait for test results before completing the workflow No false applications_config
JSON string containing application environment overrides No -
The action outputs include:
Output Description runId
The ID of the created test run runShortId
A short ID for the test run success
Boolean indicating if the run was successful run_result
The test execution result (PASSED, FAILED, SKIPPED). Only set when blocking is true. run_status
The final status of the run (INITIATED, RUNNING, COMPLETED, ERROR, CANCELLED). Only set when blocking is true.
Here are some common workflow patterns:
Run tests on pull requests:
name : QA.tech Tests
on :
pull_request :
branches : [ main ]
jobs :
test :
runs-on : ubuntu-latest
steps :
- uses : QAdottech/run-action@v2
with :
project_id : ${{ secrets.QATECH_PROJECT_ID }}
api_token : ${{ secrets.QATECH_API_TOKEN }}
blocking : true
Run tests after staging deployment:
name : Deploy to Staging
on :
push :
branches : [ staging ]
jobs :
deploy :
runs-on : ubuntu-latest
steps :
# Your deployment steps here
test :
needs : deploy
runs-on : ubuntu-latest
steps :
- uses : QAdottech/run-action@v2
with :
project_id : ${{ secrets.QATECH_PROJECT_ID }}
api_token : ${{ secrets.QATECH_API_TOKEN }}
blocking : true # Optional, default false
test_plan_short_id : 'staging-tests' # Optional
Test preview deployments with environment overrides:
name : Test Preview Deployment
on :
pull_request :
types : [ opened , synchronize ]
jobs :
deploy :
runs-on : ubuntu-latest
outputs :
frontend_url : ${{ steps.deploy_frontend.outputs.url }}
backend_url : ${{ steps.deploy_backend.outputs.url }}
steps :
- name : Deploy Frontend
id : deploy_frontend
run : |
# Your deployment logic here
echo "url=https://preview-${{ github.event.number }}-frontend.vercel.app" >> $GITHUB_OUTPUT
- name : Deploy Backend
id : deploy_backend
run : |
# Your deployment logic here
echo "url=https://preview-${{ github.event.number }}-backend.vercel.app" >> $GITHUB_OUTPUT
test :
runs-on : ubuntu-latest
needs : deploy
steps :
- uses : QAdottech/run-action@v2
with :
project_id : ${{ secrets.QATECH_PROJECT_ID }}
api_token : ${{ secrets.QATECH_API_TOKEN }}
test_plan_short_id : 'your-test-plan-id'
blocking : true
applications_config : |
{
"applications": {
"frontend-app-id": {
"environment": {
"url": "${{ needs.deploy.outputs.frontend_url }}",
"name": "PR-${{ github.event.number }}-Frontend"
}
},
"backend-app-id": {
"environment": {
"url": "${{ needs.deploy.outputs.backend_url }}",
"name": "PR-${{ github.event.number }}-Backend"
}
}
}
}
Multiple test plans with different triggers:
name : Comprehensive Tests
on :
schedule :
- cron : '0 2 * * *' # Daily at 2 AM
jobs :
smoke-tests :
runs-on : ubuntu-latest
steps :
- uses : QAdottech/run-action@v2
with :
project_id : ${{ secrets.QATECH_PROJECT_ID }}
api_token : ${{ secrets.QATECH_API_TOKEN }}
test_plan_short_id : 'smoke-tests'
regression-tests :
runs-on : ubuntu-latest
needs : smoke-tests
steps :
- uses : QAdottech/run-action@v2
with :
project_id : ${{ secrets.QATECH_PROJECT_ID }}
api_token : ${{ secrets.QATECH_API_TOKEN }}
test_plan_short_id : 'regression-tests'
blocking : true
If you prefer direct API calls instead of using the GitHub Action, you can use cURL:
Basic API usage:
curl -X POST \
-H "Authorization: Bearer $QATECH_API_TOKEN " \
-H "Content-Type: application/json" \
-d '{"testPlanShortId": "your-test-plan-id"}' \
https://app.qa.tech/api/projects/ $QATECH_PROJECT_ID /runs
With application environment overrides:
curl -X POST \
-H "Authorization: Bearer $QATECH_API_TOKEN " \
-H "Content-Type: application/json" \
-d '{
"testPlanShortId": "your-test-plan-id",
"applications": {
"app-short-id-1": {
"environment": {
"url": "https://preview-123.vercel.app",
"name": "Preview Environment"
}
}
}
}' \
https://app.qa.tech/api/projects/ $QATECH_PROJECT_ID /runs
In GitHub Actions workflow:
- name : Trigger QA.tech Tests
run : |
curl -X POST \
-H "Authorization: Bearer ${{ secrets.QATECH_API_TOKEN }}" \
-H "Content-Type: application/json" \
-d '{
"testPlanShortId": "your-test-plan-id",
"applications": {
"frontend-app-id": {
"environment": {
"url": "${{ steps.deploy.outputs.url }}",
"name": "PR-${{ github.event.number }}"
}
}
}
}' \
https://app.qa.tech/api/projects/${{ secrets.QATECH_PROJECT_ID }}/runs
To find your application IDs, go to your test plan in QA.tech and click “API Integration”. The modal will show all applications connected to your test plan with their short IDs.
For more information about our API and other integration options, check out our API Reference .