Skip to content

Getting started

Thyge S. Steffensen edited this page Jul 30, 2024 · 3 revisions

There are many ways to conduct testing and unit testing. To get the most out of Power Automate Mock Up with minimal effort and less resilience for refactoring I propose the following testing tactic.

  • Look at the entire flow as a unit.
  • Assert on the changes of the outside systems, such as Dataverse, SharePoint or that a message have been posted in Teams.
  • Don't assert or expect certain actions to be present or execute.

This way, the tests will not change, even if the flow have been refactored or in any way modified, then the only fail if the flow is no longer fulfilling its purpose.

E.g.,

The following business process could be implemented in a flow: Whenever a Lead is created, send an welcome e-mail to the Lead.

This is a straight forward flow, also seen in Samples/MinimalSample. Even though it is straightforward, it could be implemented in many different ways, all resulting in the desired output: that the Lead is getting a welcome e-mail.

Thus, the test for this flow would be that the Lead is receiving an e-mail with the desired text, or in other words: That the e-mail mock connector have registered a sent e-mail.

See more in Actions/Connectors and more

Getting started

  1. Install Power Automate Mock Up:

    $ dotnet add package PowerAutomateMockUp nuget.org

  2. Download you flows

  3. Setup the runner

  4. "Mock" actions not yet supported

Clone this wiki locally