Reputation: 6315
I'm running end-to-end tests on my Flutter app's Android version using the Patrol package. When I run these tests locally, the app requests permissions from the user (specifically for Bluetooth and notifications), and I have UI interactions based on these permission prompts.
However, when I run the same tests in Firebase Test Lab, it appears that all permissions are automatically granted, bypassing the usual user prompt flow.
My goal is to either:
Is there a way to control or check Firebase Test Lab's permission behavior, or programmatically identify that the tests are running in this environment? Any guidance or workarounds would be appreciated!
I can work around the problem with test tags, but I don't want to get to that.
Upvotes: 0
Views: 29
Reputation: 6315
There seems to be no Firebase Test Lab set envrionment variables, so I set my own with
patrol build android --dart-define=IS_FIREBASE_TEST_LAB=true
when building the Android deliverables for testing. Then, that variable is available to the patrol test code and the app code.
Upvotes: 0