A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
For Power Automate for desktop, there are two supported ways to create a testing setup for desktop flows:
- Use the built-in test case feature in Power Automate for desktop
- Requires Power Automate for desktop version 2.54 or later.
- Requires a Power Automate Premium license.
- In Power Automate for desktop, go to Tests in the left navigation.
- Select + New > Test case.
- Enter a name, select the desktop flow to test, and select Create.
- In the test case designer, add:
- Test a desktop flow to run the full flow, or
- Test a subflow of a desktop flow to test a specific local subflow.
- Add an Assert action to validate expected results, for example:
-
%Sum = 25% -
%Total > 0% -
%Status contains 'Success'%
-
- Use a hosted machine if a separate machine-based test environment is needed
- Hosted machines let teams build, test, and run attended and unattended desktop flows without setting up a physical machine.
- Hosted machines are created through the Power Automate portal.
- Power Automate provisions a Windows machine and registers it to the environment.
- This is useful when a dedicated test machine is needed instead of testing on a local device.
If the goal is only to validate flows during development, the fastest path is:
- Open Power Automate for desktop.
- Create the desktop flow.
- Open Tests.
- Create a Test case.
- Add Test a desktop flow and Assert actions.
- Run and debug the test directly in Power Automate for desktop.
If temporary input data is needed during testing, default values can be assigned to variables before running the flow, then removed afterward.
References: