androidfirebasefirebase-test-lab

How to script user input using Firebase Game Loop testing on Android?


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?:

Screenshot from firebase.google.com

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?


Solution

  • 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.