Setting Up CI/CD with Testoro in 5 Minutes
You've generated your Playwright tests with Testoro. Now let's run them automatically on every push. This guide walks through setting up GitHub Actions integration in under 5 minutes.
Prerequisites
Step 1: Generate an API Key
Step 2: Add the Secret to GitHub
Step 3: Generate the Workflow File
The easiest way is to use Testoro's built-in workflow generator:
Alternatively, here's a minimal workflow you can use directly:
name: Testoro E2E Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Testoro Tests
env:
TESTORO_API_KEY: ${{ secrets.TESTORO_API_KEY }}
run: |
curl -X POST https://api.testoro.dev/ci/run \
-H "X-API-Key: $TESTORO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"project_id": "your-project-id"}'
Step 4: Commit and Push
Save the workflow file to .github/workflows/testoro.yml in your repository and push:
git add .github/workflows/testoro.yml
git commit -m "ci: add Testoro E2E test workflow"
git push
Step 5: Verify
Each test run is recorded in your Testoro dashboard with full results, including pass/fail status, duration, and error details.
Advanced Configuration
Running Specific Tests
Target specific tests by ID:
-d '{"project_id": "...", "test_ids": ["test-1", "test-2"]}'
Running on Schedule
Add a cron trigger to run tests periodically:
on:
schedule:
- cron: '0 9 * * 1-5' # Weekdays at 9 AM UTC
Self-Healing on Failure
Pro plan users can enable automatic self-healing. When a test fails in CI, Testoro can automatically generate a healed version and open a PR with the fix.
What's Next
Once CI is set up, you get:
Five minutes of setup for continuous quality assurance. Not a bad trade.