You are here:
Testing Your Flow Before Activation
Testing your flow before activation is essential to make sure it works as expected and handles all possible scenarios. Thorough testing helps you catch errors early, improve user experience, and prevent data issues after activation. To test your flow, use sample data and different scenarios in the Flow Builder debugger. We recommend testing in a sandbox to ensure your real records don't get changed.
How to Test Your Flow
Use the debug feature in Flow Builder to test your flow before you activate it. The debugger shows you how the flow runs step by step. In the debugger you see the path the flow takes, and how resource values change throught the flow. If the flow encounters a problem, you can see exactly where the problem is, so you can fix it. Learn more in Test or Troubleshoot Flows With the Flow Builder Debugger.
Use Sample Data
Avoid using real data during initial testing to prevent accidental record changes or sending a test email to a real customer. Create test records that mimic real-world scenarios without affecting live data.
For example, if your flow is updating contact records, create a few sample contact records before testing your flow, and use those records to test the flow. If your flow runs when a lead record is created, when you test it, make sure you're creating a test lead, not a real one.
If your flow sends an email, make sure the test email is going to one of your email addresses, not a real person in your org.
Test Different Scenarios
Account for all possible paths the flow might take based on different inputs and conditions. Consider various inputs and potential edge cases for each scenario. For example, if your flow updates a record based on certain conditions, create test cases that meet and do not meet those conditions. Here are the most important things to test for.
- Path Coverage: Test all possible paths. For example, if your flow has a Decision element, test each outcome, even the default path.
- Boundary Conditions: Test with minimum, maximum, and unexpected values.
- Error Handling: Make sure fault paths and error messages work as intended.
- Permission and Access: Test as different users to verify that all users have the permissions and data access to successfully run the flow.
Use a Sandbox
We recommend testing in a sandbox so you can test as much as you want with out the fear of accidently modifying your data. Learn how to create a sandbox in Create a Sandbox.
- Test or Troubleshoot Flows With the Flow Builder Debugger
If you’re testing your flow to make sure it works as expected or troubleshooting a flow that failed, the debug option in Flow Builder can be your best friend. Review step-by-step details of how your flow runs and the path the flow takes. - Automatically Test Record-Triggered, Autolaunched, and Data Cloud-Triggered Flows
Before you activate a flow, test it to verify expected results and identify run-time failures. Use automated flow testing for record-triggered, autolaunched, and Data Cloud-triggered flows.

