Skip to main content
config

How It Works

Once connected, the TestSprite GitHub App:
  1. Detects new pull requests on your connected repository
  2. Waits for your deployment platform (Vercel, Netlify, etc.) to deploy a preview
  3. Automatically runs your TestSprite tests against the preview URL
  4. Posts a comment on the PR with a detailed test results summary

Prerequisites

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.

Generate Tests with MCP Server

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.
config
1

Install MCP Server

Follow the MCP Installation Guide to set up the TestSprite MCP Server in your IDE.
2

Generate Tests

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.

Other Requirements

  • A GitHub repository for your project
  • A deployment platform connected to your repo (e.g., Vercel, Netlify, Render, Railway, or Fly.io) that auto-deploys on PRs

Github App vs. Github Action

The GitHub App provides the simplest setup with automatic deployment detection — no workflow files needed.

GitHub App (Recommended)

Best for teams using Vercel, Netlify, Render, or other managed platforms.
  • Setup: Connect in a few clicks via Web Portal
  • Workflow files: None required
  • Deploys: Auto-detects platform deployments
  • Config: Managed in TestSprite Web Portal

GitHub Action

Best for teams with custom CI/CD pipelines who need full control.
  • Setup: Requires YAML config and repo secrets
  • Workflow files: .github/workflows/ci.yml
  • Deploys: Manual deploy step in workflow
  • Config: Defined in repository workflow files

Setup GitHub Integration

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.
config
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.
2

Connect GitHub in TestSprite Web Portal

config
  1. Log in to the TestSprite Web Portal
  2. Navigate to GitHub App in the sidebar under Settings
  3. Click Connect With GitHub App
  4. Authorize TestSprite to access your GitHub organization
  5. 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:
  1. Select a Connected Repository from the dropdown
config
  1. Configure the Pull Request Settings:
config
SettingDescription
Run on PRsAutomatically run tests when PRs are created or updated
Include Draft PRsRun tests on draft pull requests in addition to regular PRs
Blocking PRBlock the PR from merging when tests fail
  1. Click Save Changes to apply your configuration
config
4

Managing Connection

You can manage your GitHub App connections from the GitHub App settings page in the TestSprite Web Portal.
config
ActionDescription
Add ConnectionConnect additional repositories from your organization
RemoveDisconnect a repository from TestSprite
Manage in GitHubOpen GitHub to manage app permissions and repository access

Create a Pull Request

config
Create a pull request on your connected repository. The following will happen automatically:
  1. Your deployment platform deploys a preview of the PR
  2. TestSprite detects the deployment and starts running tests
  3. The TestSprite bot posts a comment on the PR with test results
The comment includes a summary table with each test case and its pass/fail status, plus a link to the detailed TestSprite results page.
Both methods produce the same test result comments on your pull requests. Choose the approach that best fits your team’s workflow.

Next Steps