Skip to content

Conversation

@andreia-ferreira
Copy link
Collaborator

@andreia-ferreira andreia-ferreira commented Dec 19, 2025

Towards: google/ground-android#3365

To make Android end to end tests reliable and self-contained, we need to pre-populate the Firebase emulator with a dedicated test survey. This PR adds a new folder with this test data test-android and a new command nx start-android-test-data to launch an emulator based on this data.

A separate github action was also added in order to run this from the ground-android repo. This action will be used by a workflow hosted in the ground-android repo

@andreia-ferreira andreia-ferreira force-pushed the andreia/3365/add-e2e-test-data-to-firebase-emulator branch from 482c9c4 to eca4296 Compare December 22, 2025 18:01
@andreia-ferreira andreia-ferreira changed the title Update firebase emulator data for Android e2e tests Update firebase emulator data and add github action for Android e2e tests Dec 23, 2025
@andreia-ferreira andreia-ferreira force-pushed the andreia/3365/add-e2e-test-data-to-firebase-emulator branch from a4cff8e to feb6b81 Compare January 2, 2026 11:34
@gino-m
Copy link
Collaborator

gino-m commented Jan 10, 2026

Hi @andreia-ferreira What's the status of this issue? Are you blocked on anything?

Also, is there a place where we outline how these "golden master" tests will work, and what we need to do true e2e testing?

@codecov-commenter
Copy link

codecov-commenter commented Jan 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.41%. Comparing base (d8c55d9) to head (f830583).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2327   +/-   ##
=======================================
  Coverage   58.41%   58.41%           
=======================================
  Files         115      115           
  Lines        2888     2888           
  Branches      425      425           
=======================================
  Hits         1687     1687           
  Misses       1144     1144           
  Partials       57       57           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@andreia-ferreira andreia-ferreira marked this pull request as ready for review January 12, 2026 16:40
@auto-assign auto-assign bot requested a review from rfontanarosa January 12, 2026 16:40
@andreia-ferreira
Copy link
Collaborator Author

@gino-m my main challenge right now is getting the CI to run the Android emulator tests correctly alongside the Firebase emulator from this repo. The action that starts the Firebase emulator seems to be working well, so no blockers on this side and I've marked the PR as ready, thanks for checking!

Also, is there a place where we outline how these “golden master” tests will work, and what we need to do true e2e testing?

Not yet, I haven't added that anywhere yet. But since the E2E flow will start from the android repo I can add the documentation there.

@gino-m
Copy link
Collaborator

gino-m commented Jan 12, 2026

@gino-m my main challenge right now is getting the CI to run the Android emulator tests correctly alongside the Firebase emulator from this repo. The action that starts the Firebase emulator seems to be working well, so no blockers on this side and I've marked the PR as ready, thanks for checking!

Would it be easier to use https://firebase.google.com/docs/test-lab instead of standing up an emulator?

Also, is there a place where we outline how these “golden master” tests will work, and what we need to do true e2e testing?

Not yet, I haven't added that anywhere yet. But since the E2E flow will start from the android repo I can add the documentation there.

Can we set it up so that the same GitHub Action is run from both repos? The action would check out most codebases at a particular commit, build, and run. Wdyt?

@andreia-ferreira
Copy link
Collaborator Author

Would it be easier to use https://firebase.google.com/docs/test-lab instead of standing up an emulator?

with our current setup, working with a local Firebase emulator, it wouldn't be possible I believe

Can we set it up so that the same GitHub Action is run from both repos? The action would check out most codebases at a particular commit, build, and run. Wdyt?

That would be ideal, but this PR adds static test data for Android, it's not generated dynamically yet so triggering the workflow on this repo wouldn't do much right now. Btw, I added some documentation in the Draft PR I'm working on the Android side: https://github.com/google/ground-android/pull/3429/files#diff-bfcda924045749dc64968acb3b1a38887b094a6a793d11cd7fe2bc4a42bb8d23

@gino-m
Copy link
Collaborator

gino-m commented Jan 15, 2026

with our current setup, working with a local Firebase emulator, it wouldn't be possible I believe

That sounds right. In a follow-up, perhaps at the end of integration tests (I wouldn't call them e2e at this point), at the end of tests we write the data back to the repo so that the other repo can use it as input? I.e., changes to ground-platform will trigger integration tests which write its output (eventually at multiple points in the process) to GitHub or elsewhere. ground-android would use that output as inputs to its tests. We could then do the opposite, without ground-android writing its db contents someplace which ground-platform could access. Wdyt?

Can we set it up so that the same GitHub Action is run from both repos? The action would check out most codebases at a particular commit, build, and run. Wdyt?

That would be ideal, but this PR adds static test data for Android, it's not generated dynamically yet so triggering the workflow on this repo wouldn't do much right now. Btw, I added some documentation in the Draft PR I'm working on the Android side: https://github.com/google/ground-android/pull/3429/files#diff-bfcda924045749dc64968acb3b1a38887b094a6a793d11cd7fe2bc4a42bb8d23

Ok please disregard for now.

@andreia-ferreira
Copy link
Collaborator Author

That sounds right. In a follow-up, perhaps at the end of integration tests (I wouldn't call them e2e at this point), at the end of tests we write the data back to the repo so that the other repo can use it as input? I.e., changes to ground-platform will trigger integration tests which write its output (eventually at multiple points in the process) to GitHub or elsewhere. ground-android would use that output as inputs to its tests. We could then do the opposite, without ground-android writing its db contents someplace which ground-platform could access. Wdyt?

good one, I’ll add a step in the upcoming github action on ground-android to export the Firebase emulator data after the test survey is filled, so it can be reused or inspected later

@andreia-ferreira andreia-ferreira merged commit 6c7d483 into master Jan 15, 2026
9 checks passed
@andreia-ferreira andreia-ferreira deleted the andreia/3365/add-e2e-test-data-to-firebase-emulator branch January 15, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants