Flutter FirebaseLab tests are used to build flutter applications and to run them using different versions of emulators and physical devices.
These tests consist of two parts:
The recipe supports three properties: physical_devices to specify actual hardware connected to firebase infra to run tests, virtual_devices to specify the virtual devices(avd) to use and task_name for selecting the integration test to build.
physical_device and virtual_device are strings that take the MODEL_ID format defined by firebase. Use gcloud firebase test android models list
(assuming you have gcloud installed) for a list of possible model id’s.
Task name is the subdirectory of dev/integration_tests (e.g. android_views, channels, etc ) that contains the integration test to build.
The following is an example of the properties format:
physical_devices: >- [ "--device", "model=oriole,version=33", "--device", "model=griffin,version=24" ], virtual_device: >- [ "--device", "model=Nexus5,version=21", "--device", "model=Nexus6P,version=27" ]
The recipe executes the following workflow:
gcloud firebase
command to upload the binary and delegates the execution of the test to firebase lab.E/flutter
is found in the logcat file.This is only required for manually running the steps
flutter-infra-staging
gcloud firebase test android models list
and gcloud firebase test ios models list
to find the available devices.bringup: true
to validate the changes end to end in presubmit.The following is an example of a full target: Linux firebase_oriol33_abstract_method_smoke_test. By convention the name should follow the format “<host os> firebase_<model id>_<taskname>”
In the example below recipe: firebaselab/firebaselab
refers to the recipe to use to run the test and should probably always be the same, dependencies
refers to the android sdk to use for the test, in general all tests should use the same android sdk unless specifically testing something that changes across android sdk versions, task_name
refers to the integration test to use see the definition above for where to find the code that is run, physical_devices
virtual_devices
are defined above.
- name: Linux firebase_oriol33_abstract_method_smoke_test # This is required for new tests to allow the # configuration to propagate. bringup: true recipe: firebaselab/firebaselab # The unit for timeout is minutes. 1 hour is enough # for most use cases unless the test is using a device # with low capacity and the queue is expected to be # longer than 30 minutes. timeout: 60 Properties: # These top level dependencies are shared between firebaselab # tests. For the current values you can copy paste the # dependencies from another firebaselab target. Changing these # values are only necessary when upgrading to a new android sdk # version. dependencies: >- [ {"dependency": "android\_sdk", "version": "version:33v6"} ] # Use for metrics collection and to be able to filter tasks** # in swarming. tags: > ["firebaselab"] task_name: abstract_method_smoke_test physical_devices: >- ["--device", "model=oriole,version=33"] virtual_devices: >- []