> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superun.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Isolated test environment

> Use superun Cloud Computing to create a temporary backend environment isolated from production for safe pre-release verification.

An **isolated test environment** gives an online project a separate backend for continued development and pre-release checks. Your live site keeps using production while the project workspace uses the test database, authentication settings, and service URL.

<Note>
  This capability is currently available for online projects using **superun Cloud Computing on the China site**. The product currently labels it **Free for a limited time**; the latest availability and billing information shown in the product takes precedence.
</Note>

## Test and production environments

|                        | Test environment                                                                                                      | Production environment                                                                 |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| Main purpose           | Development, debugging, and pre-release verification                                                                  | Serving real users                                                                     |
| Initial data           | Created from a recent production backup and may contain production data                                               | Current live data                                                                      |
| URL and authentication | Separate test URL and authentication settings                                                                         | Stable production URL and authentication settings                                      |
| Changes                | Direct test-environment changes do not automatically sync to production and may be lost after recycling or rebuilding | Persistent and affected only by an explicit production release or production operation |
| Lifecycle              | Idle environments are recycled daily and restored when needed                                                         | Remains available for the live site                                                    |

<Warning>
  Isolation prevents test operations from directly changing production, but the test environment may still contain recently backed-up production data. Apply the same data-protection rules you use for production, and never expose credentials or personal data in screenshots, chat messages, or third-party services.
</Warning>

## Before you begin

* The project must be **currently online**. A project that has never been published, or is currently offline, cannot enable the test environment.
* **Owners** can enable, retry, or rebuild it. **Owners and editors** can view and use it after it is enabled.
* The project must use superun Cloud Computing. Projects connected only to a user-owned Supabase do not show this entry.

## Enable the test environment

<Steps>
  <Step title="Open superun Cloud Computing">
    In the project, go to **Development → Skill Library → superun Cloud Computing**, then open the **Test environment** tab.
  </Step>

  <Step title="Review the isolation rules">
    Select **Enable test environment**. Confirm that the test and production URLs, data, and authentication settings are separate, and that idle test resources and test-only changes may be recycled.
  </Step>

  <Step title="Wait until it is ready">
    superun creates the test database from a recent production backup, restores the required configuration and Edge Functions, and publishes a test build. Keep the page open to follow the status. Do not start verification until the page reports that the test environment is ready.
  </Step>

  <Step title="Develop and verify in test">
    Use the database, authentication, logs, and other cloud tools shown on this tab. When configuring a callback URL, webhook, allowlist, or third-party credential, check that you are using the **test** URL rather than the production URL.
  </Step>
</Steps>

When you are ready to update the live site, use the normal **Operations → Publish** flow. Treat publishing as the production change boundary; do not assume that rows, users, or settings changed directly in the test environment will be copied to production.

## Daily recycling and automatic restoration

Idle test environments are checked and recycled every day at **2:00 AM**. If a project is active at that time, superun keeps its test environment available. After an environment has been recycled, reopening the project starts restoration from a recent production backup.

Restoration can take some time. During this period, test cloud tools and test builds are unavailable. Test-only data or configuration from the previous environment is not guaranteed to remain.

## Rebuild from production

Use **Rebuild test environment** when you need a clean environment based on the latest available production backup, or when test-only changes have made the environment unreliable.

<Warning>
  Rebuilding permanently deletes the current test environment, including its table data, authentication configuration, and other test-only changes. It does not delete or modify the production environment.
</Warning>

Only the project owner can start a rebuild. Wait for the status to return to ready before continuing development or verification.

## Environment safety checklist

* Check the environment label and URL before reading or changing data.
* Use test callback URLs and credentials while debugging; use production values only for the live release.
* Assume the test database may contain sensitive production data from a recent backup.
* Do not store the only copy of important data or configuration in the test environment.
* Re-test authentication, Edge Functions, webhooks, and third-party callbacks after a restore or rebuild.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Why can't I enable the test environment?">
    Confirm that the project is currently online, superun Cloud Computing is enabled, you are on the China site, and your role is Owner. Editors can view and use the environment but cannot enable, retry, or rebuild it.
  </Accordion>

  <Accordion title="Why does the page keep showing that the environment is being prepared?">
    The database fork, configuration restoration, Edge Function deployment, and test build are asynchronous. Keep the page open and wait for the ready state. If the page reports a failure, the owner can retry; if it stays in one stage for an unusually long time, contact support with the project ID and the displayed stage.
  </Accordion>

  <Accordion title="Why did yesterday's test data disappear?">
    Idle test environments are recycled daily and later restored from a recent production backup. Direct test changes are temporary and are not guaranteed to survive recycling or rebuilding.
  </Accordion>

  <Accordion title="Will rebuilding affect the live site?">
    No. Rebuild deletes and recreates only the test environment. Production remains online, but all current test-only data and configuration are permanently discarded.
  </Accordion>

  <Accordion title="Which URL should I give to a third-party service?">
    Use the test URL while verifying in the test environment, and the production URL for the live integration. The two URLs are different; update callback URLs, webhooks, allowlists, and credentials deliberately when moving between environments.
  </Accordion>
</AccordionGroup>

***

<CardGroup cols={2}>
  <Card title="superun Cloud Computing" icon="cloud" href="/superun/integrations/cloud">
    Learn how to manage databases, authentication, and backend services.
  </Card>

  <Card title="Publish" icon="rocket" href="/superun/features/publish">
    Publish a verified version to the production environment.
  </Card>
</CardGroup>
