GitHub Integration
Connect your GitHub repositories to ProvaLab.io to link commits to test cases, show test results as PR status checks, and run TMS-integrated tests in GitHub Actions.
What You Can Do
- Link commits to test cases -- Include
[TMS-123]in commit messages to auto-link - PR status checks -- See test results directly on pull requests
- GitHub Actions -- Run your test suite with ProvaLab.io reporting in CI
- Repository sync -- Browse code coverage and test case mappings from ProvaLab.io
Connect GitHub to ProvaLab.io
Step 1: Open Integration Settings
- In ProvaLab.io, go to Settings > Integrations
- Find GitHub and click Connect
Step 2: Authorize ProvaLab.io
- You'll be redirected to GitHub's authorization page
- Select the organization and repositories to grant access to
- Click Authorize
Step 3: Select Repositories
After authorizing, choose which repositories to link:
- Select the repositories that contain your test code
- Map each repository to a ProvaLab.io project
- Click Save
Link Commits to Test Cases
Include [TMS-123] anywhere in your commit message to automatically link the commit to ProvaLab.io test case 123:
git commit -m "Fix login validation [TMS-101] [TMS-102]"
This creates a link visible in both places:
- In ProvaLab.io: The test case shows the commit under "Related Commits"
- In GitHub: The commit links back to the ProvaLab.io test case
Multiple test cases in one commit
git commit -m "Refactor auth module [TMS-101] [TMS-102] [TMS-103]"
In pull request descriptions
You can also reference test cases in PR descriptions:
## Changes
- Fixed login validation logic
- Updated error messages
## Test Cases
- [TMS-101] Login with valid credentials
- [TMS-102] Login with invalid password
PR Status Checks
When ProvaLab.io is connected to GitHub, test results appear as status checks on pull requests.
How it works
- A developer opens a PR
- GitHub Actions (or your CI) runs tests with the ProvaLab.io reporter
- ProvaLab.io receives the results and updates the PR status check
- The PR shows a green check (all passed) or red X (failures)
Setup
- Go to Settings > Integrations > GitHub
- Under Status Checks, toggle Enable PR status checks
- Select which test runs should report to PRs:
- All test runs triggered from the repository
- Only CI test runs (triggered via GitHub Actions)
- Specific test plans only
What the check shows
The status check includes:
- Total tests run
- Pass/fail/skip counts
- Link to the full test run in ProvaLab.io
- Failed test names (in the details)
GitHub Actions
Run your tests with ProvaLab.io reporting in GitHub Actions. Here's a complete workflow example:
Playwright Example
name: Run Tests
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
env:
TMS_API_URL: ${{ secrets.TMS_API_URL }}
TMS_API_KEY: ${{ secrets.TMS_API_KEY }}
TMS_ORGANIZATION_ID: ${{ secrets.TMS_ORGANIZATION_ID }}
TMS_PROJECT_ID: ${{ secrets.TMS_PROJECT_ID }}
TMS_ENVIRONMENT: ci
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- name: Upload test report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
Jest Example
name: Run Tests
on:
push:
branches: [main]
pull_request:
env:
TMS_API_URL: ${{ secrets.TMS_API_URL }}
TMS_API_KEY: ${{ secrets.TMS_API_KEY }}
TMS_ORGANIZATION_ID: ${{ secrets.TMS_ORGANIZATION_ID }}
TMS_PROJECT_ID: ${{ secrets.TMS_PROJECT_ID }}
TMS_ENVIRONMENT: ci
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npx jest --ci
pytest Example
name: Run Tests
on:
push:
branches: [main]
pull_request:
env:
TMS_API_URL: ${{ secrets.TMS_API_URL }}
TMS_API_KEY: ${{ secrets.TMS_API_KEY }}
TMS_ORGANIZATION_ID: ${{ secrets.TMS_ORGANIZATION_ID }}
TMS_PROJECT_ID: ${{ secrets.TMS_PROJECT_ID }}
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: pip install -r requirements.txt
- run: pytest --tms-enable --tms-environment=ci
Setting up GitHub Secrets
- Go to your GitHub repository
- Click Settings > Secrets and variables > Actions
- Add these secrets:
| Secret | Value |
|---|---|
TMS_API_URL | https://tms.yourcompany.com |
TMS_API_KEY | Your API key from ProvaLab.io Settings |
TMS_ORGANIZATION_ID | Your organization ID |
TMS_PROJECT_ID | Your project ID |
If you have multiple repositories, add ProvaLab.io secrets at the GitHub organization level so all repos can use them.
Verify It Works
- Connect GitHub from Settings > Integrations
- Add ProvaLab.io secrets to your GitHub repository
- Create a commit with
[TMS-1]in the message - Push and verify the link appears in ProvaLab.io
- Open a PR and verify the status check appears
- Status check not appearing: Make sure PR status checks are enabled in ProvaLab.io integration settings
- Commit links not working: Verify the format is
[TMS-123](with brackets and dash) - GitHub Actions failing: Check that all four ProvaLab.io secrets are configured in your repository settings