--- title: "Running Unit Tests on a Flow" slug: "running-unit-tests-from-the-flow-designer" description: "Configure Flow Unit Tests with default inputs and Output Rules to automatically evaluate whether a Flow returns expected results." tags: ["flow data", "unit tests", "Flow"] updated: 2026-06-26T18:48:54Z published: 2026-06-26T18:48:54Z canonical: "documentation.decisions.com/running-unit-tests-from-the-flow-designer" --- > ## 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-1779120475850.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/image-1782499269611.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-1779120601521.png) 5. On the **Properties** panel, click **Edit Input Mappings**.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1779120635593.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/image-1779120679317.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/image-1779120728391.png) 9. In the window, enter "NumberOut" with an Int32 [Number] Type. Click the pencil icon. Select **Unknown** and select **Flow Data**. Select **Add_Output** and click DONE. Click Save and close the window.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1782499371489.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 **+.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1782499417793.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/image-1782499449091.png) 4. Click **Select Data Element** and select **Outcome_Done_NumberOut**. Click NEXT.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1782499466881.png) 5. Select **Equals** as the verb and click NEXT.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1782499488721.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/image-1782499511656.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 5".![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1782499541430.png) 9. Click Run All next to UNIT TEST. **![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1782499669244.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/image-1782499695734.png)