Health App Automated Testing Error Replicating Example
This repository demonstrates that the Health App on the iOS simulator instance running in a GitHub Action Runner environment does not display any content in the “Browse” section, making it impossible to test adding external HealthKit data such as EEG data in a UI test.
- Download and install Xcode 14.1
- Reset the Simulator to get a completely clean instance
- Run the UI Tests in this Repo by opening
- The unit tests open the Health App and add Health Data using UI tests. You can observe the behavior in the iOS Simulator and see the Results in the Health App:
Observed Behaviour on GitHub Action Runners
- The GitHub Action Runners run the same UI tests using the GitHub Action found in
- The tests fail as the HealthKit’s “Browse” tab does not include any content, e.g.,: https://github.com/CardinalKit/HealthKitTest/actions/runs/3466876834.
- The GitHub Action demonstrates this behavior as the UI tests create a screenshot on save and saves it in a
- You can download the results bundle as an artifact created by the UI test and observe its behavior in Xcode by opening the
- The following screenshot taken from the https://github.com/CardinalKit/HealthKitTest/actions/runs/3466876834 GitHub Action’s
.xcresultfile from the GitHub Action run demonstrates this behavior: