Skip to main content
Connect GitHub to automatically test your preview deployments. Every time you push a PR, Morph runs an AI browser test and posts a video recording as a comment.

How It Works

  1. You push code to a PR
  2. Vercel/Netlify creates a preview deployment
  3. Morph’s AI tests the preview with browser automation
  4. Results and video recording are posted as a PR comment

Setup

Step 1: Connect GitHub (Required)

  1. Go to Integrations
  2. Click Install on GitHub
  3. Select the repositories you want to test
Morph only requests access to PR metadata and comments — we never access your code.

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:
  1. Go to Integrations
  2. Click Connect Vercel
  3. 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:
  1. Go to your Vercel project → Settings → Deployment Protection
  2. Under “Protection Bypass for Automation”, click Generate Secret
  3. 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:
  1. In the integrations page, find your project
  2. Click Configure under Site Login
  3. Enter test credentials
Morph will use these to log in before testing. Use x_user and x_pass in your test prompts to reference them.

Path Filters

Only test PRs that change specific files:
  1. Click the repo name in your installation
  2. Add a path filter like src/components/
PRs that don’t touch these paths won’t trigger tests.

Check Runs

By default, Morph only posts PR comments. Enable check runs to block merging until tests pass:
  1. Find your installation in the integrations page
  2. Toggle Enable GitHub Check Runs

Example PR Comment

When Morph finishes testing, you’ll see a comment like:
## Morph Preview Test

**Preview URL:** https://your-app-pr-123.vercel.app

### AI Summary
Tested the new pricing page. Verified all three pricing tiers load
correctly and the "Get Started" buttons are clickable.

### Recording
[Embedded video of the test]

View full session →

Troubleshooting

Check that:
  • GitHub App is installed on the repository
  • You have an API key configured
  • The PR has a preview deployment URL
Your preview likely has Deployment Protection enabled:
  1. Connect Vercel in the integrations page
  2. Add the bypass secret for your project
Morph tests the root URL of your preview. If you need to test a specific page, mention it in your PR description:
Test the /pricing page for the new tier layout

Next Steps