How It Works
- You push code to a PR
- Vercel/Netlify creates a preview deployment
- Morph’s AI tests the preview with browser automation
- Results and video recording are posted as a PR comment
Setup
Step 1: Connect GitHub (Required)
- Go to Integrations
- Click Install on GitHub
- Select the repositories you want to test
Step 2: Connect Vercel (If Using Deployment Protection)
Vercel enables Deployment Protection by default on most projects. This blocks unauthorized access to preview deployments. To let Morph test protected previews:- Go to Integrations
- Click Connect Vercel
- For each project, click Get Bypass Secret and follow the Vercel instructions
Why is this needed? Vercel’s deployment protection blocks all requests without a bypass secret. Without it, Morph can’t load your preview to test it.
What’s a Bypass Secret?
A bypass secret is a token that lets automation tools access protected previews. When Morph tests your preview, it includes this token in the request so Vercel allows access. To generate one:- Go to your Vercel project → Settings → Deployment Protection
- Under “Protection Bypass for Automation”, click Generate Secret
- Copy the secret and paste it in Morph
Configuration
Site Authentication
If your preview requires login (e.g., a dashboard behind auth), you can configure test credentials:- In the integrations page, find your project
- Click Configure under Site Login
- Enter test credentials
x_user and x_pass in your test prompts to reference them.
Path Filters
Only test PRs that change specific files:- Click the repo name in your installation
- Add a path filter like
src/components/
Check Runs
By default, Morph only posts PR comments. Enable check runs to block merging until tests pass:- Find your installation in the integrations page
- Toggle Enable GitHub Check Runs
Example PR Comment
When Morph finishes testing, you’ll see a comment like:Troubleshooting
Tests aren't running
Tests aren't running
Check that:
- GitHub App is installed on the repository
- You have an API key configured
- The PR has a preview deployment URL
Can't access preview (403/401)
Can't access preview (403/401)
Your preview likely has Deployment Protection enabled:
- Connect Vercel in the integrations page
- Add the bypass secret for your project
Wrong page is being tested
Wrong page is being tested
Morph tests the root URL of your preview. If you need to test a specific page, mention it in your PR description: