Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can I do conditional branching in a Synthetics Test ?


If validation on a certain step fails I can choose an alternate path ?


For example - if validation on step 5 fails goto step 17 else goto step 23 or something equivalent to that


Dynatrace Advisor
Dynatrace Advisor


I haven't tried this myself but you may be able to achieve this by using JavaScript events. Through the use of the JavaScript API you should have the ability to skip execution of events to create a dynamic workflow. I'll provide a link with documentation on this below.

Hope this helps!

So I can only skip steps.... and 'skip them forward' ... Any clever way to 'jump back' a few steps ? Are negative numbers allowed as parameters to skip step function ?

Correct, there is no option to jump back to a previous step. 

Synthetic SME and community advocate.


I have not tried this myself, but might need it in the following weeks. In my case, it's like an IF THEN/ELSE needed to be involved. In each case, 3 steps. So I was imagining to test the result from the site at the end of step 2, and if it's condition A, it would execute steps 3-5, and skip 3 events at the end of step 5. If it's condition B, it would skip 3 events at the end of step 2, executing steps 6-8.

Does this seem feasible in your opinion? If so, it would also solve issues like the one portrayed above, right?

Antonio Sousa

Yes, this scenario is exactly what the skip clickpath events in the javascript event are perfect for. 

Synthetic SME and community advocate.

Featured Posts