[Technical Questions] Tests passing locally but not on GitHub Workflow #34
-
In what area do you have a technical challenge?Xcode, Simulator & Previews DescriptionCurrently, our tests pass locally. However, all of our PRs are failing the same tests ( ReproductionThis issue began occurring recently, specifically after we started to push data to our firebase. Initially, we were also failing the tests locally. However, we solved this issue by uploading our user accounts and mock data to the actual firebase rather than the emulator. Expected behaviorWe expect the tests to pass both locally and on the GitHub workflow. Additional contextFollowing the Simulator, I found that my tests can fail locally intermittently in two cases:
Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @jennxu23 & @CS342/2023-utah, The problem you are describing is due to your changes in the following PR: CS342/2023-Utah#44. We achieve this using the Firebase emulator and also encourage you to use it during development. This follows the recommendations from Google about Firebase environments (https://firebase.google.com/docs/projects/dev-workflows/overview-environments) and general best practices when trying to verify the functionality of the software, which is especially critical for a medical context. While this might lead to a bit of a longer development time to write and maintain these tests, it is essential to ensure a high-quality system. As Oliver mentioned in the class: We don't want to lose any patient data or deploy a version of the software that doesn't work for our users. To verify the behavior that the GitHub Actions use to test the code, you need to have the emulator up and running, and your application has to be tested against this controlled environment (e.g., no existing user account). This allows us to ensure that, e.g., the account sign-up function is tested every time to verify that it is working. I have created a PR that addresses your issues by doing the following:
This should solve your problem; the tests are now passing on GitHub: CS342/2023-Utah#48 |
Beta Was this translation helpful? Give feedback.
Hi @jennxu23 & @CS342/2023-utah,
The problem you are describing is due to your changes in the following PR: CS342/2023-Utah#44.
In this PR, you changed the Firebase Account settings to not use the emulator. While this is right and useful for releasing the application through, e.g., TestFlight or maybe testing it on your device where you would need to manually determine the IP of your computer to connect to the emulator there, it is essential for the UI tests, which must run in a controlled environment to establish a set of entry conditions for the system under test.
We achieve this using the Firebase emulator and also encourage you to use it during development. This follows the recommenda…