Do we need real device tests? #1555
Replies: 3 comments 1 reply
-
We can't test iOS 11 and 10 on simulators because as of 21st December 2021 we can't run macos-10.14 on GitHub Actions and macos-10.15 only supports simulators with iOS 12 and higher. As we also want to test iOS 11 and 10 we need real device tests. |
Beta Was this translation helpful? Give feedback.
-
Although Apple recommends testing apps in real device before publishing, in 11 years of iOS development I never found any difference running an app in a real device or simulator. I never caught a bug in a real device that didn't occur in simulation. |
Beta Was this translation helpful? Give feedback.
-
I've maybe had a handful of cases where it made sense to test with a real device, like for stack unwinding edge cases that needed to be validated on an ARM chip vs x86_64, or something to do with AVFoundation/location that wasn't able to be done in a simulator at the time–they're always gaining more simulation capability. Maybe nowadays with an M1 desktop running simulators in CI that's no longer an issue. Anyways, now that we have real device tests, it's something we can more easily deploy to reproduce/validate a bug/fix if we need it. I think we can close this discussion. |
Beta Was this translation helpful? Give feedback.
-
This discussion tries to answer the following question: Do we need to run our UI tests on real devices, or are simulators enough?
Background
With the release of APM in 7.2.0, we had plenty of hotfixes afterward. One of the many mitigations to avoid such issues and other regressions in the future was to add UI tests and run them on SauceLabs.
Flaky Test
We have the problem that the UI tests fail around 20% of the time. The main reason is that the
testNavigationTransaction
fails withThe test fails randomly no matter which OS or iPhone. I ran the UI tests repeatedly 100 times on an iPhone 12 with iOS 15.2 and an iPhone 6 with iOS 12.5.5 and the
testNavigationTransaction
didn't fail a single time.Past Issue Analysis
This section looks at past issues and identifies which one of these could have been caught by UI tests on a simulator and which ones by UI tests on a real device.
As it turns our all issues that we could have caught with UI tests can be detected on a simulator and don't need a real device. We only need to make sure we run the UI tests on different iOS versions.
Beta Was this translation helpful? Give feedback.
All reactions