web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Suggested Answer

"Testing" actions.

(2) ShareShare
ReportReport
Posted on by 40
I just noticed a "Testing" category in my actions pane and am wondering what they do. The actions are named Assert and Test a desktop flow. The More info links go to the URLs https://learn.microsoft.com/en-us/power-automate/desktop-flows/actions-reference/testing#assertaction and https://learn.microsoft.com/en-us/power-automate/desktop-flows/actions-reference/testing#runtestflow but that page returns a 404 error at this time - the page does not exist.
 
I'd like to learn more about these, for example how is Testing > Test a desktop flow different from Run flow > Run desktop flow, and examples of using Assert. Is there another URL that covers these actions?
 
I have the same question (0)
  • ronaldwalcott Profile Picture
    3,847 Super User 2025 Season 2 on at
    I have not seen a URL which describes these features but "Test a desktop Flow" should test the flow without affecting the environment that it is being tested and Assert is used to assert that some variable has a value or some condition is true (basically run this test with this variable set to this value). This is how equivalent options work with other tools.
     
    Hopefully they should provide documentation which details how to effectively use these options.
  • Jagster Profile Picture
    40 on at
    Thanks, I'm just still not grasping it and could definitely use examples. I don't quite understand what is meant by "test the flow without affecting the environment that it is being tested". And also don't understand why I wouldn't just use the regular Run desktop flow action, along with various IF/THEN actions to check for expected outputs. When I use the Test a desktop flow action, it just runs the selected flow, just as Run desktop flow does. I notice no difference. I'm sure after some use cases and examples it will make sense though.... they've added it for a reason and I'm curious.
  • CU20012229-0 Profile Picture
    12 on at
    This is standard testing methodology. The idea is to decouple this 'module' from the rest of the code so that if it fails it is not because the input was invalid.  Essentially you provide 'hardwired' inputs and define (assert) what the output should be. This link gives the general idea. https://www.geeksforgeeks.org/how-to-do-unit-testing-detailed-guide-with-best-practices/
  • Suggested answer
    CU20012229-0 Profile Picture
    12 on at
    This is standard unit testing approach. The idea is to decouple the module from its inputs so that you dont say it failed if the inputs were invalid. So you "hardwire' the inputs for each test case and "Assert' what the output should be.

    https://en.wikipedia.org/wiki/Unit_testing
  • ronaldwalcott Profile Picture
    3,847 Super User 2025 Season 2 on at
    Testing allows you to check that the action completes without creating a permanent change to your environment.
    Consider that you want to change the first row and first column in an Excel table to some value which originates from some other place. If you use Run the desktop flow you have to ensure that you can access the location to get the value to add to your Excel table. If you use Test a desktop flow you should be able to use assert to set the value without having to read it from the other place.
    In some cases using Test allows you to test individual parts of your flow without having any needed inputs also configured.
    In other cases you don't need it.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard