Tip For Testing Your Flows In Power Automate

Wouldn’t it be nice if we can Test our Flows without executing some of the actions like Sending Emails, creating items in SharePoint or Dataverse?

Guess what we can! And its very easy to do. Check this out!

Tip For Testing Your Flows In Power Automate

If your like me, you test your Flows over and over again. This results in sending unwanted emails, creating items in SharePoint or Dataverse, Creating files on OneDrive or SharePoint.
Every time you test your Flow, these actions inside our Flow get executed and cause unwanted behavior when Testing.

Wouldn’t it be nice if we can Test our Flows without executing these actions? Guess what we can! And its very easy to do. Check this out!

Scenario

For example, I have a Flow that Create a new row in Dataverse, and then send an email to the person who created the new row. That is fine, but what happens when we have other actions in our Flow that we want to test to make sure they are correct.
I may want to test the Flow multiple times if I am doing some data manipulation, but this will result in Creating multiple unwanted rows (records) in Dataverse, as well as send emails every time.

We can clean up the testing process easily.

How?

We can utilize a feature called Static Result.

First click the 3 dots on the action, and select Static Results.

Tip For Testing Your Flows In Power Automate

Next we can configure the static results. For easy example click the radio button to enable, select your Status, and the Status Code.

Click Done.

Now the action will have a yellow beaker, indicating that the action is using Static results.

Tip For Testing Your Flows In Power Automate

Things to note:
– Static Result are in ‘Preview’ so it could change at any time
– Not all actions will be able to use them
– If the option is greyed out, and you’re certain the action is able to use it, save the Flow and re open

Pause
This is only the beginning, as you can create a custom failed response, or create any result you want. This can help troubleshooting and testing certain scenarios.

REMEMBER!! To turn off static results when you want to execute the actions like normal.

Examples

Some examples on when to use static results:

  • Flow runs without sending emails
  • Flow runs without Approvals needed
  • Flow runs that need to test errors on certain actions
  • Flow runs testing different error codes (Advanced) + Custom error codes

Conclusion

I have used this feature for awhile now, and noticed not many know about it. It’s so useful in many testing scenarios. Just remember to disable the static results once your done testing!

If you have any questions or want to add anything please leave a comment and like this post! Thank you!

More Power Automate blogs can be found at the ESPC Resource Center!

About the Author:

Microsoft Business Applications MVP

Reference:

Cook, J. (2023). Tip For Testing Your Flows In Power Automate. Available at: https://flowaltdelete.ca/2022/02/16/tip-for-testing-your-flows-in-power-automate/ [Accessed: 30th March 2023]. 

Share this on...

Rate this Post:

Share: