Testing Shortcuts Automation

Is it possible to test a shortcut in the Automation tab by eg pressing a button? For example, to test a WiFi triggered one when I’m not anywhere near any/that WiFi network.

(This is the same “35,000 feet” scenario as I once asked about for PushCut (@sliemeobn will remember).)

My best guess is I can make each Automation shortcut call another shortcut, the latter doing the real work. Then I can invoke this second shortcut manually to test it.

Perhaps this encapsulation is for the best anyway.

(By the way I tested that a called shortcut can take input and return output to a calling shortcut - so this form of encapsulation works well in general.)

Thoughts?

well, since you mentioned me: I would place anything you call from an automation inside a properly named shortcut as the default - even small stuff, don’t even think, just create a shortcut and do all the work in there. the automation’s only action is: run shortcut.

If you have a good naming scheme going, it makes life a lot easier.
That way testing/reusing/changing the automation actions is way more manageable.

1 Like

I’m also thinking of colour coding my shortcuts in the following way:

  • Blue for Production
  • Green for Invoked-By-Another

Different from @MacSparky colour coding but it’d help me know which shortcuts were experimental. I say this as someone who might declare “shortcut bankruptcy”. :frowning: :slight_smile:

I would personally recommend putting all the actual work in other Shortcuts, but with the caveat that you may run into things that don’t quite work as expected. E.g. one (resolved) bug I ran into was that the “Wait” action couldn’t run in the background - thankfully this is now fixed.

1 Like