# Test and publish (/docs/workflows/test-and-publish)

> Run a workflow with sample data, read the result, then publish it and turn on its live link.

## Run a test [#run-a-test]

**Test** runs your current draft once with sample data you type in. You
don't need to publish first.

![Running a test from the builder](/docs-images/workflows/run-a-test.gif)

### Open the test box [#open-the-test-box]

Click **Test**. The **Test Trigger Payload** box opens, already filled with
the fields your workflow uses.

![The test box lists the fields your nodes use](/docs-images/workflows/test-payload.jpg)

### Fill in sample values [#fill-in-sample-values]

Use realistic values. To try one branch, pick values that lead there, for
example a score below 50 for the cold path.

### Start the test [#start-the-test]

Click **Start Test**. The run's live view opens.

Tests run every node for real. Calls are placed, emails and messages are
sent, and your CRM is updated. Test with your own phone number and email
address, never a customer's.

## Read a run [#read-a-run]

![The live view of a run](/docs-images/workflows/run-view.jpg)

1. Overall result: completed, waiting, failed, or canceled.
2. Color key: green completed, amber waiting, red failed.
3. Time spent between nodes.
4. **UNKNOWN** means the run did not go down this path.
5. and 6. Click any node to see what it received (**Input**) and what it produced (**Output**).
7. **Re-test in editor** returns to the builder.
8. **Copy link** shares this run with a teammate.

## Publish [#publish]

### Publish the workflow [#publish-the-workflow]

Click **Publish** and confirm. The current version goes live, and a fresh
draft is created for future edits.

![The publish confirmation](/docs-images/workflows/publish-dialog.jpg)

### Turn on the live link [#turn-on-the-live-link]

Open the trigger and switch on **Webhook Trigger (Production)**. Your private
**Webhook URL** appears with a copy button.

![The live link switch and URL](/docs-images/workflows/webhook-live-link.jpg)

### Connect your source [#connect-your-source]

Paste the URL into your website form, CRM, or other tool so it sends new
leads to the workflow.

### Publish again after trigger changes [#publish-again-after-trigger-changes]

If you changed the trigger, click **Save** and **Publish** again so the live
version includes the change.

Treat the live link like a password. Anyone who has it can start your
workflow.

## Draft and published versions [#draft-and-published-versions]

Keep editing safely after publishing. Your edits stay in the draft until you
publish again. Real events always run the published version.

![The published view](/docs-images/workflows/published-view.jpg)

1. The published version is read-only.
2. **Active** pauses or resumes the live workflow without deleting anything.
3. **View/Edit Draft** returns to editing.
4. and 5. Run counts on each node show how many runs passed through it.