Quick Start
Setup
1
Install the Morph GitHub App
Go to morphllm.com/dashboard/integrations/github and install the app on your repository. This allows Morph to post test results as PR comments.
2
Get your API key
Get your API key from morphllm.com/dashboard/api-keys.
3
Add secrets to your repository
Go to your repository’s Settings → Secrets and variables → Actions and add:
MORPH_API_KEY- Your Morph API key- Any test credentials your app needs (see Testing with Credentials)
Inputs & Outputs
Inputs
Outputs
Testing with Credentials
For apps that require login, pass credentials via GitHub secrets and reference them in your instructions usingx_user and x_pass placeholders.
Setting Up Test Credentials
- Go to Settings → Secrets and variables → Actions
- Add repository secrets:
TEST_USERNAME- Test account email/usernameTEST_PASSWORD- Test account passwordADMIN_USERNAME- Admin test account (if needed)ADMIN_PASSWORD- Admin test password (if needed)
Testing Multiple User Roles
Test different user types by running parallel jobs with different credentials:Testing Multiple Flows
Run comprehensive test suites by testing different user journeys:Platform Integrations
Vercel
Netlify
Railway
Custom Infrastructure (EKS, GKE, Self-hosted)
Handling Third-Party Auth (Clerk, Auth0, Supabase)
Third-party auth providers may block automated browsers. Solutions:Option 1: Add Preview URL to Allowed Origins
Configure your auth provider to accept requests from preview URLs:- Clerk: Dashboard → API Keys → Allowed origins
- Auth0: Applications → Settings → Allowed Origins
- Supabase: Authentication → URL Configuration
https://*.vercel.app or your specific preview URL pattern.
Option 2: Use Test/Development Mode
Many auth providers have development modes that are more permissive:Option 3: Test Public Pages Only
For previews, you may choose to only test unauthenticated flows:Writing Effective Test Instructions
Good Instructions
Be specific and actionable:Bad Instructions
Avoid vague descriptions:Tips for Better Tests
- Number your steps - Makes it easier to identify where failures occur
- Be explicit about expected outcomes - “Verify X appears” rather than “check X”
- Use specific selectors when helpful - “Click the green ‘Submit’ button”
- Include negative tests - “Verify error message appears for invalid input”
Conditional Testing
Only Test on Specific Files Changed
Skip Tests for Draft PRs
Complete Production Example
A full workflow with all best practices:Troubleshooting
Test results not appearing on PR
Test results not appearing on PR
Cause: Morph GitHub App not installed or lacks permissions.Fix:
- Install the app at morphllm.com/dashboard/integrations/github
- Ensure it has access to your repository
- Check the app has “Pull requests: Read and write” permission
Authentication errors
Authentication errors
Cause: Invalid or missing API key.Fix:
- Verify
MORPH_API_KEYis set in repository secrets - Check the key is valid at morphllm.com/dashboard/api-keys
- Ensure you have available credits
Preview URL not accessible
Preview URL not accessible
Cause: Preview not deployed yet or URL incorrect.Fix:
- Add a wait/health check step before running tests
- Verify the preview URL is publicly accessible
- Check deployment logs for errors
Login not working
Login not working
Cause: Third-party auth blocking automated browsers.Fix:
- Add preview URL pattern to auth provider’s allowed origins
- Use development/test mode credentials
- Test only public pages in preview tests
Tests timing out
Tests timing out
Cause: Complex tests exceeding default timeout.Fix:
- Break complex tests into smaller focused tests
- Run tests in parallel jobs
- Increase job timeout:
timeout-minutes: 15
How It Works
- Your CI/CD deploys to your infrastructure (Vercel, Netlify, EKS, etc.)
- Action triggers and sends the preview URL to Morph
- Morph’s AI browser executes your test instructions
- Results posted directly to your PR as a comment
Requirements
- Morph GitHub App installed on your repository
- Valid Morph API key with available credits
- Publicly accessible preview URL (cannot test localhost)
See Also
- Browser Automation SDK - Direct SDK usage with full control
- Browser as Agent Tool - Use in AI agent workflows
- browser-use Python - Python SDK integration