facebookarchive / ios-snapshot-test-case

Snapshot view unit tests for iOS
MIT License
2.66k stars 253 forks source link

Unstable snapshot images despite running the same set up #237

Open macduy opened 7 years ago

macduy commented 7 years ago

Running the same test in the same version of Xcode (8E3004b) and same version of Simulator (10.3.1) on two different machines can produce slightly different images (e.g. certain views being 1px taller).

This causes our snapshot tests to fail. Do you have insight why this could be happening and if there are recommendations on how to work around this?

durul commented 7 years ago

I experienced same problem. I think the reason is Derived data. ios-snapshot-test-case keeps reference in Derived data and referenceImage files. Another machine does not have same references and referenceImages. If someone provide more accurate and official answer, I will appreciate.