---
title: "Running Unit Tests on a Flow"
slug: "running-unit-tests-from-the-flow-designer"
tags: ["flow data", "unit tests", "Flow"]
updated: 2025-06-17T18:27:50Z
published: 2025-06-17T18:27:50Z
---

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

# Running Unit Tests on a Flow

## Overview

Unit tests run like regular tests in the Debugger but allow users to define default Flow input data. This prevents the user from having to enter data when running each time. If a Flow does not have input data, the Unit Test option will not appear in the debugger. Using a unit test is especially helpful during the development of a Flow that uses many types of input data. Unit tests also allow the ability to define an Output Rule for evaluating Flow output data, if present. If there is no output data, this may be ignored. This lets users evaluate whether a Flow is returning the expected output data when running with a certain set of input data.

---

## Example

In this example, a Flow will add 10 to any number and output the result.

1. In a Project, click CREATE FLOW on the **Global Action Bar**. Select **Flow**, name the Flow (AdditionFlow) and click CREATE.
2. Click SETUP INPUT DATA. Click DEFINE.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1750184472078.png)
3. In the **Input Data** window, enter "Number" under NAME and change the TYPE to **Int32 [Number]**. Click **Save**and close the window.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-01-13_11h15_41.png)
4. Click the **Done**path on the **Start**step. Navigate to **All Steps [Catalog] > Data > Numbers** and select the **Add**step. Click ADD.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1750184555162.png)
5. On the **Properties**panel, click **Edit Input Mappings**.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1750184607464.png)
6. Attach the **Number**path to **V****alue1**. For **Value2**, select **Constant**map and enter "10". Click OK.  
![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-01-13_11h18_38.png)
7. Attach the Done path of the Add step to the **End s**tep**.**
8. Select the End step. On the Properties panel click SHOW EDITOR from under the **Output**field under the DATA category.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-01-13_11h47_02.png)
9. In the window, enter "NumberOut" with an Int32 [Number] Type. Click the pencil icon. Select **Unknown**and select **Select From Flow**. Select **Add_Output**and click DONE. Click Save and close the window.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-01-13_11h32_12.png)
10. Click Save to save changes to the Flow.

## Add Unit Test

1. On the top action bar**,**click **Debug**.
2. Next to UNIT TEST, click **Add New**.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-01-13_11h35_49.png)
3. Enter "Failed Test" in the **Test Name** field. Under the INPUT DATA - CONSTANT category, enter "5" as the Number. Click EDIT UNIT TEST RULE.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-01-13_11h36_38.png)
4. Click **Select Data Element** and select **Outcome_Done_NumberOut**. Click NEXT.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-01-13_11h38_07.png)
5. Select **Equals**as the verb and click NEXT.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-01-13_11h40_05.png)
6. Enter "25" in the value field and click DONE. Click Save to save changes and close the Rule Designer.  
 ![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-01-13_11h40_33.png)
7. Click Save to save the Unit Test.
8. Add another Unit Test named "Successful Test" with a constant number of "5". Configure the Unit Test Rule to evaluate if "Outcome_Done_NumberOut Equals 15".![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-01-13_11h42_15.png)
9. Click Run All next to UNIT TEST.**![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-01-13_11h43_35.png)**
10. The first test will have a Failure result.  The second test will have a Successful result. To run a test individually, click the play button on the right side of each unit test entry.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-01-13_11h44_13.png)
