-
Notifications
You must be signed in to change notification settings - Fork 102
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
One snapshot to test them all #211
Comments
Hi there, and thanks for the question. This is the exact right place. So let's see if I understand – the question is how developers can run their unit tests across many different device simulators and get a reliable answer? It's a tricky problem because, just like iOS versions, the emulated hardware can create snapshot differences. At Artsy, we rely on using the same device simulator for unit testing (same iOS version and same device). We try to do our best with this testing utility, which tries to mimic what an actual device would be. The code is Objective-C and we haven't used it for new tests in a while (we've moved to React Native). Here is an example use: I hope that helps! I would highly recommend your dev team all use the same simulator and test device for local unit tests, though. It's the best way to get reliable results. |
@MrRipcord One of the things you could try is have an extension such as this:
and |
Hello!
I'm a QA person trying to set Nimble-Snapshots up, and it's come to my attention that my devs like to run their unit tests with various device simulators (iPhone 11, iPhone X, iPad, etc.). I can't seem to figure out how to set it up so I can record one snapshot for a particular screen, and they can run their tests using any device simulator they like.
I've tried setting up a dynamic size test for a particular size, but if I record it on an iPhone 11 I must still test on an iPhone 11. The same for device agnostic snapshots.
Assuming this is even possible I realize I may have to at least have one snapshot for iOS 14, and one for iOS 13.6, but any help help you all can give this super novice dev would be greatly appreciated.
Thank you very much, and apologies if this isn't the correct place to ask this.
The text was updated successfully, but these errors were encountered: