TestSprite MCP Server is required first. The GitHub integration only runs tests — it does not generate them. You must use the TestSprite MCP Server to generate your test suite before setting up this integration.
The TestSprite MCP Server is responsible for generating, executing, and refining your test cases locally. Once your tests are committed to your repository, the GitHub App can run them automatically on every PR.
Use the MCP tools to generate test plans and test code for your project. See First MCP Test for a step-by-step walkthrough.
3
Commit Tests to Your Repository
Ensure the generated testsprite_tests/ folder and test files are committed and included in your repository. The GitHub App will use these tests during CI/CD runs.
The TestSprite GitHub App provides a streamlined, no-config integration that automatically detects deployments and runs tests on every pull request. Unlike the GitHub Action approach, the GitHub App requires no workflow YAML files — just connect your repository through the TestSprite Web Portal.
1
Connect Your Deployment Platform
Connect your repository to a deployment platform that supports automatic preview deployments on pull requests. Supported platforms include:
These platforms provide a Connect Repo button that links your GitHub repository and automatically deploys a preview on every PR.
As long as the deployment platform posts a deployment status on the PR (e.g., the Vercel bot comment), TestSprite can detect it and use the preview URL for testing.
Navigate to GitHub App in the sidebar under Settings
Click Connect With GitHub App
Authorize TestSprite to access your GitHub organization
Select the repositories you want to connect
Once authorized, you will see your connected organization displayed on the GitHub App settings page.
3
Configure Repository Settings
After connecting your organization, configure the integration for each repository:
Select a Connected Repository from the dropdown
Configure the Pull Request Settings:
Setting
Description
Run on PRs
Automatically run tests when PRs are created or updated
Include Draft PRs
Run tests on draft pull requests in addition to regular PRs
Blocking PR
Block the PR from merging when tests fail
Click Save Changes to apply your configuration
4
Managing Connection
You can manage your GitHub App connections from the GitHub App settings page in the TestSprite Web Portal.
Action
Description
Add Connection
Connect additional repositories from your organization
Remove
Disconnect a repository from TestSprite
Manage in GitHub
Open GitHub to manage app permissions and repository access
Integrate TestSprite into your CI/CD pipeline by adding a GitHub Actions workflow to your repository. Every time a pull request is created or updated, TestSprite automatically runs your tests against a preview deployment and reports results directly on the PR.
1
Set Up Project Deployment
Configure a preview deployment so TestSprite can test against a live URL on each PR. Here are some example setups you can use to deploy your app:
Vercel
Render
Railway
Netlify
Fly.io
Deploy preview builds to Vercel using the Vercel CLI inside GitHub Actions. You’ll need to link your project locally with vercel link, then store the generated credentials as GitHub secrets.Secrets required:
Trigger a Render deploy from GitHub Actions using the community render-deploy action. This calls the Render API to deploy your service and optionally waits for it to finish.Secrets required:
Deploy preview environments on Railway for every pull request using the community railway-preview-deploy action. Each PR gets its own isolated environment with a unique URL.Secrets required:
Secret
Description
RAILWAY_API_TOKEN
Generate from your Railway account settings
RAILWAY_PROJECT_ID
Found in Railway dashboard under Settings > General
Deploy preview builds to Netlify using the community action-netlify-deploy action. Each PR gets a unique preview URL that you can use for testing.Secrets required:
Deploy to Fly.io using the official flyctl-actions action from Superfly. The workflow installs flyctl and runs flyctl deploy against your fly.toml configuration.Secrets required:
Secret
Description
FLY_API_TOKEN
Generate by running fly tokens create deploy -x 999999h locally
If you set blocking: 'true', the GitHub Action will fail when tests do not pass, which can block PR merges if you have branch protection rules enabled.
Complete workflow examples by platform
Full ci.yml examples that combine deployment and TestSprite testing in a single workflow.