I'm interested in scripting some user actions for regression testing my app as I publish updates. I have read this firebase doc and this Google page on Game Loop and I clearly am not getting it.
Am I supposed to script the user actions I want to mimic by writing Java code here?:
I thought I would be able to run the app on a device and record user actions as a scripting mechanism. Is that not how this works?
Game loops don't help you script your app, they help you run your already scripted app. There's no API within game loops for automating actions; that Java snippet would help a running game loop determine what "scenario" (integer ID) the app was launched as.
If your app is a native Android application (i.e. you're not using the NDK or a game engine), you could consider recording your user actions as part of a Roboscript. Firebase Test Lab supports running Robo tests, which could reliably replay those actions using that Roboscript as input.