Showing results for 
Search instead for 
Did you mean: 
Advocate I
Advocate I

Detecting a Test Flow

Is it possible to detect if a flow has been triggered by a test run, re-submission of a previous run or is a live run?  How?

Community Support
Community Support

Hi @cymorg1,


I'm afraid there is no way to detect whether a specific flow is one of the test flows. The best approach I can find is:

1\ Manage a test environment;

2\ Create solutions within this environment;

3\ Create flows and test them in the solutions;

4\ Export the solution as a managed solution and import to production environment, turn off the flow in test environment.

5\ You will be able to edit, modify and test the flow in the test environment, once completing the test procedure you can export the solution and update the flow which in the production environment.


Hope this helps.


Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Normally I'd accept @v-jefferni's solution however it's such a long workaround it doesn't really count as practical.  The reason I wanted to detect test runs is to bypass certain steps in the live flow without introducing additional variables.  The workaround is valid, and probably best practice, but it doesn't suit my use case where the step(s) I'm trying to bypass (API calls) incur a real-world cost so the problem would exist in both a live and test environment unless I drastically alter the flow in my test env., in which case, when it comes to deployment there is a whole lot of other work to do.  Frankly, it's easier to have the additional variables than to follow the steps outlined by v-j (no offence buddy & thanks for responding, it is appreciated).

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,344)