Testing a flow
When building a flow you can use the Debug functionality on the Flow Builder to test your flow. This will show you details of how your flow is executed and if any errors are encountered:
Figure 16.4: Debug button on the Flow Builder page
It will be easier to understand this when we use it on a flow that we have built together, so we will see this in action in the Testing the flow sections as we step through some examples.
A quick note on flow testing: you should always build your flows in a sandbox or developer org and test them thoroughly before deploying to production. Flows are an extremely powerful tool that can wreak havoc if used incorrectly and not tested.
In the summer ‘22 release, Salesforce announced Flow Tests (in beta), which are point-and-click tests that you can construct in order to test flows in a similar way to developers testing Apex code. This will likely become the best practice over time.
Now that we have...