Skip to main content
Run tests automatically when code changes. Get results as PR comments.

Installation

1

Install GitHub App

Go to github.com/apps/rehearsal-ai and click Install
2

Select Repositories

Choose which repos should run tests on PRs
3

Create Test Suite

In Rehearsal dashboard, create a test suite for your repo
4

Open a PR

Bot runs tests automatically and posts results as comments

How It Works

  1. PR opened → Bot detects code changes
  2. Select tests → Runs relevant tests based on changed files
  3. Execute → Tests run in cloud browsers
  4. Report → Results posted as PR comment with pass/fail status

Example PR Comment

## Rehearsal Test Results ✅

**3 tests passed** | 0 failed | Runtime: 45s

✅ Login flow
✅ Checkout process
✅ Search functionality

View full results: [Dashboard Link]

Configuration

Control which tests run on which PRs:
  • Test suites → Group tests by feature area
  • Branch rules → Only run on main, staging, etc.
  • File patterns → Run tests when specific files change
Free tier: 50 test runs/month. Paid: Unlimited.

Troubleshooting

Check GitHub App permissions. Repo needs “Pull requests: Read & Write” enabled.
Environment variables might be missing. Add secrets in Rehearsal dashboard settings.
Split into multiple test suites. Run critical tests first, full suite nightly.

Creating Tests

Learn how to write effective tests

Running Tests

Execute tests manually or in CI/CD