Integry provides you with the Flow testing feature to ensure the proper working of your integrations. Just like every separate element on the app level, you can also test every step in your Flow.
With Flow testing, you can not only verify the functionality of all the steps in your workflow but also view the data coming in from each step. This way, you can test every part of your Flow while building it and save it when you know everything is good to go. In addition, you won’t need to set up integrations from the end-user’s perspective to check if any step in your Flow is working.
You can learn more about Flows here. Also, see how you can create a Flow from scratch.
Testing a step
There are various types of steps that you can work with inside the Flow Builder. Every step, like an Action, Trigger, or loop, can be tested from within the Flow. To test any step, all you need to do is click on the Test button at the bottom of each step. An example is shown below.
Once you click on the Test button, you’ll see a test interface within the step; depending on the type of step you are testing. Since this is a simple Trigger that notifies of a subscriber being created in MailChimp, you will see the following message prompting you to carry out the Trigger operation on the Trigger app.
At the same time, you will also see a message confirming that your Flow has been saved. Once you create a subscriber in MailChimp, it will be displayed in your test as output. Shown below is what that output will look like. Everything is similar to the general Trigger testing procedure.
Clicking on the Trigger bar in the above image will provide you with the details of the new subscriber that you’ve created in MailChimp.
Previewing input data
Before testing any step, you can preview the data going into the step as input. This is the data that a step is getting from a parent step (or a linked step) to work with. This data is presented in a standard JSON response format, as shown below.
Let’s see the process of previewing the data by extending our current example. Let's say that you add an Action step as a child of the Trigger mentioned above.
The Action step added is a ‘Create contact’ Action for Sendinblue.
To see the input data for a step, you need to test the parent step first so that the input data can be generated. As we’ve already tested the parent Trigger in our current example, we’re good to go.
Click on the Test button for the child step shown above.
After a successful test, you will see the prompt confirming that your Flow has been saved. Next, you can view the step data that we’ve tested above by clicking on the Test Result bar. This will be the input data from the parent step going into this step.
You can see the input data in JSON format, and you can expand each object to see the data inside it. This input data will provide you with the information this Action will use to create this same contact in Sendinblue. All this attribute data you see in this input will be copied to the Sendinblue’s contact created by this Action.
For every step you test within a Flow, its output data is saved in a shadow Data Tree. As in the above example, you can see the data in the tree by opening the fields section from the slide-in menu on the right of the Flow builder. This shows available generated data for all the steps in the Flow and follows the hierarchy of your Flow. For example, let’s say your Flow has six main parent steps (starting from step 0). If you check input data for any step in the Flow, it will show you the data tree like this:
Each parent step has its own object (with the same index) in the tree, which you can expand and see the data for its test result. If a step had child steps, that hierarchy will be followed in the data tree as well, and you can expand that step and see the tested data to the deepest level.
Expanding any of the above steps will display the result data if the step has been tested.
You can have multiple data trees in a Flow. This provides the option of testing your Flow with different sets of data and checking out multiple scenarios in your integration. By default, every Flow has a Default data tree. You can see which tree you have selected by clicking on the top-level drop-down called Data Tree.
To create a new data tree, you can just click on the field where you see your selected test tree name. Write a name for the new test, and you’ll see a drop-down prompt for creating that new tree, as shown below.
Creating a new test tree will put that tree as the selected one for your Flow. Now the input data for all the steps will be cleared, and you can test any step again, and it will start adding to this new data tree. An example of a Flow with two steps and an empty data tree is shown below.
You can switch between your data trees to use their respective test data, as all the saved test data for every tree is preserved. So you can freely switch between trees and keep your sets of data intact.
Testing the rest of the steps in Flows
The Flow builder supports several types of core as well as utility steps. Testing methods of each remaining step can be found in their respective help documentation. Visit these articles and learn how each of these steps can be tested:
Please sign in to leave a comment.