---
title: "Test runs"
description: "Run a workflow's draft with its expected payload or an existing survey response, without sending email or calling anything outside."
icon: "flask"
---

A **Test run** runs the workflow as it is in the editor, with its **expected payload** (a Webhook trigger) or with
**an existing response** to its survey (a Response completed trigger), and shows what a real run would do: which branch each [If/else](/workflows/if-else) takes, whom each email would go to, and what each
[HTTP request](/workflows/http-request) would send. It sends no email and calls nothing outside Formbricks.

<Note>Workflows are part of the Formbricks [Enterprise Edition](/self-hosting/advanced/license).</Note>

{/* SCREENSHOT PLACEHOLDER: test-run-result.webp. Run detail of a Test run with the Test label, an If/else that
took its Then branch with each condition marked matched, and a Send email step showing the address it would have
emailed. Save to /images/platform/workflows/test-run-result.webp and replace this comment with a <Frame>. */}

## Start a Test run

### Webhook trigger

<Steps>
  <Step title="Set the expected payload">
    Open the [Webhook trigger](/workflows/webhook-trigger) and write or paste the payload your system sends, or send
    a call to its URL and select **Use as expected payload**.
  </Step>

  <Step title="Set the expected response body for HTTP requests">
    For each HTTP request set to **Wait and use it**, fill its **Expected response body** card: write or paste the
    JSON its API answers with, or select **Send test request** and then **Use as expected response body**. A Test
    run answers with that body.
  </Step>

  <Step title="Run the test">
    Select **Test run**. Formbricks runs the draft at once and saves the result as a run.
  </Step>
</Steps>

### Response completed trigger

<Steps>
  <Step title="Have a response to test with">
    The survey needs at least one response. To test a new workflow, fill out the survey once yourself.
  </Step>

  <Step title="Set the expected response body for HTTP requests">
    As for a Webhook trigger, fill the **Expected response body** card of each HTTP request set to **Wait and use
    it**.
  </Step>

  <Step title="Pick the response">
    Select **Test run**. The drawer lists the survey's responses, newest first, with when each came in, whether it
    is completed or partial, and its first answer. The newest completed response is selected. Pick another, or
    select **Load more** to see older ones.
  </Step>

  <Step title="Run the test">
    Select **Run test**. Formbricks runs the draft as if that response had just come in and saves the result as a
    run. To try another response, pick it in the trigger step and select **Run again**.
  </Step>
</Steps>

A real run only starts for a completed response, and, if the trigger is limited to certain endings, only for a
response that reached one of them. You can still test with any other response: the drawer tells you a real run
would skip it.

You don't have to save or enable the workflow first: a Test run uses the current draft. It does need to pass the
same checks as **Enable**, so fix any problem the editor lists first.

## What a Test run does

The trigger, the conditions and the order of the steps work exactly as in a real run. Only the steps with an
effect outside Formbricks are replaced:

| Step                              | In a Test run                                                                                                   |
| --------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| **If/else**                       | Runs for real, so you see the branch a real run would take and which conditions matched.                        |
| **Switch**                        | Runs for real, so you see the case a real run would take, or Default.                                           |
| **Send email**                    | Sends nothing. Run detail shows the recipient and, if there is one, the survey link the email would have used.  |
| **HTTP request, Wait and use it** | Calls nothing. Run detail shows the request it would have sent, and later steps get the step's last test response. Without a test response, later steps get no response from it. |
| **HTTP request, Don't wait**      | Calls nothing. The step ends at once with the request it would have sent.                                       |

## Find Test runs

Test runs appear under **Runs** with a **Test** label, next to real runs. Use the runs filter to hide them. Test
runs are never billed and don't count toward usage. They are deleted 7 days after they started (see
[Run data retention](/workflows/manage-and-monitor#run-data-retention)).

## When Test runs are available

- A Webhook workflow has an expected payload, or you write one in the trigger panel.
- A Response completed workflow's survey has at least one response, and you can see that survey.
- The workflow isn't archived.
- You have write or manage access to the workspace.

You can start 30 Test runs per minute.

## Test run, Test request or a real call?

| You want to…                                                      | Use                                                                              |
| ----------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| See which branch a payload or a response takes and what each step would do | **Test run**                                                            |
| See what one API really answers                                   | **Send test request** on that [HTTP request](/workflows/http-request#send-test-request) |
| Check the whole workflow end to end, including email delivery     | Enable it and call the Webhook Secret URL, or fill out the survey, so that it emails your own address |
