Preview environments are temporary, isolated environments created for specific feature branches or pull requests. They allow you to test changes in a production-like environment before merging code into your main branch.

What are Preview Environments?

Preview environments are dynamically created environments that:

  • Deploy your application with the latest changes from a specific branch
  • Provide a unique URL for testing the changes
  • Are automatically cleaned up after the feature is merged or the branch is deleted
  • Enable stakeholders to review and test features before they go live

Creating Preview Environments

1

Navigate to Environment Settings

Go to Settings → Environments in your project dashboard.

2

Create Preview Environment

Click “Add Environment” and select “Preview Environment” as the type. Configure the environment with your preview deployment URL pattern.

3

Configure URL Pattern

Set up the URL pattern to match your preview deployment system (e.g., https://feature-branch-name.preview.yourapp.com).

4

Set Lifecycle Rules

Configure automatic cleanup rules and expiration settings for the preview environment.

Integration with API

You can trigger test runs against preview environments using the Start Run API. The API allows you to override environment configurations per application when starting a test run.

Integration with CI/CD

Use the QA.tech GitHub Action to automatically test preview environments. The action supports:

  • Dynamic URL configuration - Override environment URLs using applications_config
  • Multiple application testing - Test frontend, backend, and other apps simultaneously
  • Blocking mode - Wait for test completion before proceeding
  • PR-based deployments - Automatic testing on pull requests
  • Custom deployment integrations - Works with Vercel, Netlify, AWS, and other platforms

For complete setup examples and configuration options, see the GitHub Action documentation.