Tests for Record-Triggered Flows
Excited to see this new feature on record-triggered flows where we can test all the scenarios by creating test data similar to test classes in Apex and making sure all the aspects are running as expected.
Though it’s still in beta but would like to walk through the steps to set up tests in flow.
- Go to record triggered flows and click on view tests(beta) and click on create
- Provide the name of the test, trigger point, and path for the test(only run immediately is available for now).
- The next step would be to create the sample data to test with.
- The final step is to set the assertion before you see the magic happen.
Select the test class to be tested and click on “Run test and view Details”, which then triggers the test run.
Here is the result basis the test cases. It reflects if the assertion has passed/failed.