-
Notifications
You must be signed in to change notification settings - Fork 137
Add E2E test to fill in a survey with all task types #3414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…st-survey # Conflicts: # app/src/main/res/layout/date_task_frag.xml # app/src/main/res/layout/time_task_frag.xml
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3414 +/- ##
============================================
+ Coverage 69.89% 69.91% +0.01%
Complexity 1596 1596
============================================
Files 318 318
Lines 8571 8569 -2
Branches 949 950 +1
============================================
Hits 5991 5991
+ Misses 2004 2002 -2
Partials 576 576
🚀 New features to boost your workflow:
|
|
This is excellent! How would this flow actually get triggered from GitHub Actions? I assume it would work against a local emulated db populated by the web test interactions? |
|
@gino-m I haven't updated the GitHub actions in this MR yet, I will do it in a follow up. After adding these tests, I was thinking on updating and reusing the existing This removes a dependency on the web e2e, which I wasn’t able to run locally, and makes the Android tests more deterministic and easier to extend. Using pre-populated emulator data lets us test against a more varied and representative survey configuration (including all task types) without having to modify or re-run web e2e flows that currently would only create a single-task survey. Let me know what you think, happy to discuss further |
shobhitagarwal1612
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤖 🧪
Towards #3365
This PR focuses on implementing a E2E test that covers the full flow of filling a survey, including all supported task types.
The previous test implementation was relying too much on UIAutomator, which can make the tests slow and flaky. To address this, this PR introduces a new test architecture centered around a TestDriver abstraction and the Robot pattern
The following was implemented:
TestDriverinterface that defines the supported user interactions which the implementation then define how to perform. In this case, for the Android tests it will prioritize Espresso and ComposeTestRule, using UIAutomator only when necessary (system interactions, maps etc)Robotbase class and its implementations to encapsulate the interactions specific for each pageSurveyRunnerTestwith the new patternHow to test
You can run the test locally by using the
localDebugbuild variant while running the Firebase emulator on the ground-platform project. The current emulator data doesn't have the survey used in this test, you need to use the one which will be added in this PR: google/ground-platform#2327Screen_recording_20251222_182518.webm
@shobhitagarwal1612 @gino-m PTAL?