Skip to content

Conversation

@anonymous-akorn
Copy link
Contributor

The main change is the addition of the Firebase Test Lab tool for testing mobile testapps. The third commit (c0f3bc7) has a detailed commit message explaining the tool and its differences from its counterpart in google3.

Another important change is to remove intermediate deps/objects after each integration test. These were found to contribute 400-1200 megabytes per project and are not needed after building. This should address the issue with Windows running out of disk space for the integration test workflow.

Building an integration test generates 400-1000+ megabytes of unnecessary dependencies and intermediates files. To improve performance and avoid OOM errors, these are deleted after each build that generates them.
Test scripts were moved to scripts/gha, but the workflows were not updated to reflect this.
This tool sends testapps (apks and ipas) to Firebase Test Lab, and then uses their log output to validate them. This is a heavily modified/simplified version of the tool that exists in google3 (firebase/app/client/unity/testapp_builder/firebase_test_lab). At a high level the tool works as follows: - Authorize the use of a Google Cloud project to use its storage bucket. - Search a directory for apks/ipas. - Send them to FTL for testing, using the gcloud api. FTL will store their log output in the GCS bucket. - Once they're done, find the testapp logs in GCS using gsutil, a command line tool installed as part of the Cloud SDK. - Validate the test results in the testapp logs and provide a summary of all the results. Changes to the tool in google3 include: - Significantly less code. - Makes far fewer assumptions about where FTL puts stuff in cloud storage. No longer requires hard-coded information about FTL's devices (which change over time). - Cleans up the output. - Prints the output from FTL when sending testapps, instead of storing it in a file on GCS. - Prints more helpful information if something unexpected occurs, like being unable to find the testapp log on GCS. This includes a recursive dump of everything added to the GCS bucket for this run, in case anything moved around. This will also make it easier to find items of interest, such as video links. "gsutil cp gs://<etc> <local_path>" can be used to copy the relevant items for further debugging. - Does not require Linux anymore. Should work on all three platforms, though I haven't tried it on Windows. Using the tool requires installation of the Google Cloud SDK, which is a requirement of using FTL from the command line. There's a convenient Github action which handles this, though we may add some automation to install this later to simplify local setup.
anonymous-akorn and others added 5 commits August 25, 2020 11:04
* add secret files for instance_id integration test * disable auth integration test on linux due to keychain access Co-authored-by: cynthiajiang <cynthiajiang@google.com> Co-authored-by: Cynthia J <cynthiajoan@users.noreply.github.com>
The workaround is to build twice. We capture the output and check for the presence of the failed task associated with the issue in question. If present, we build again. Otherwise, we raise an error that mimicks the error that would have been raised by running the subprocess with check=True, to maintain the same behaviour. This will make it easier to remove this workaround if/when the underlying issue is fixed.
DellaBitta and others added 6 commits September 1, 2020 13:38
DellaBitta
DellaBitta previously approved these changes Sep 1, 2020
Copy link
Contributor

@DellaBitta DellaBitta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

vimanyu
vimanyu previously approved these changes Sep 1, 2020
Copy link
Contributor

@vimanyu vimanyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@anonymous-akorn anonymous-akorn dismissed stale reviews from vimanyu and DellaBitta via 1606450 September 1, 2020 22:16
@anonymous-akorn anonymous-akorn merged commit f1a3884 into dev Sep 1, 2020
@DellaBitta DellaBitta deleted the feature/ak-integration-tests branch September 1, 2020 23:26
@firebase firebase locked and limited conversation to collaborators Oct 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

4 participants