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

# Test & Deploy

> Build in test mode, verify your workflows, and deploy to production

## Modes

Every automation environment operates in one of two modes:

| Mode     | Editing              | Execution       | Secrets & Databases |
| -------- | -------------------- | --------------- | ------------------- |
| **Test** | Full editing enabled | Test runs only  | Test-scoped         |
| **Live** | Read-only            | Production runs | Live-scoped         |

Use the mode toggle in the sidebar to switch between test and live.

## Building in Test Mode

Test mode is your development environment. All editing happens here:

* Create and configure composers, steps, and connections
* Manage test secrets and databases
* Run test executions to verify behavior
* Review step-by-step logs and outputs

### Running a Test

You can run a test execution in two ways:

1. **From the Composer** — click the play button next to your composer in the sidebar
2. **From the Canvas** — click the **Run** button in the canvas header

Test runs use test-scoped secrets and databases, keeping your production data safe.

## Deploying to Live

When your workflow is ready for production, deploy it from test mode to live.

<Steps>
  <Step title="Open the Deployment Dialog">
    Click the **Deploy** button while in test mode.
  </Step>

  <Step title="Review What Gets Promoted">
    The dialog shows what will be promoted: steps, connectors, and their configurations.
  </Step>

  <Step title="Select Secrets and Databases">
    Use the checkboxes to choose which test secrets and databases should be copied to the live environment.
  </Step>

  <Step title="Confirm Deployment">
    Click **Deploy** to promote your test configuration to live.
  </Step>
</Steps>

## Versioning

Automations track versions at two levels:

### Revisions (Edit History)

While you edit an automation in test mode, revisions are saved automatically in the background. Each revision is a snapshot of the automation's steps, connectors, and trigger configuration at a point in time.

* View revisions from the **history icon** in the canvas header
* Click a revision to preview that version on the canvas
* Click **Restore** to roll back to a previous revision — a backup of the current state is saved first
* Click the **tag icon** on a revision to label it with a tag and optional name, so important checkpoints are easy to find

Revisions let you safely experiment and undo changes without losing work.

### Deployments (Test to Live)

Each deployment creates a snapshot of your test configuration and promotes it to the live environment. Live mode always reflects the most recent deployment — there is no way to edit live directly.

If you need to roll back a live deployment, restore a previous revision in test mode and re-deploy.

## Editing After Deployment

To make changes to a deployed workflow:

1. Switch to **test mode** using the sidebar toggle
2. Make your modifications
3. Test again to verify
4. Re-deploy to promote the updated configuration to live

<Note>
  Changes made in test mode do not affect the live workflow until you deploy again. Live mode always reflects the last deployment.
</Note>

## Related Documentation

<CardGroup cols={2}>
  <Card title="Runs & Logs" icon="list" href="/automations/runs">
    View execution history for test and live runs.
  </Card>

  <Card title="Secrets" icon="lock" href="/automations/secrets">
    Secrets are scoped per mode and copied during deployment.
  </Card>

  <Card title="Databases" icon="database" href="/automations/databases">
    Databases are scoped per mode and copied during deployment.
  </Card>
</CardGroup>
