We can see up here that when snapshot tests fail we have attachments. If we take a look at it, we’ll see three images:

  • Red: This is the reference snapshot, what we are using to compare to — the exact same look it did when we recorded our snapshot for the first time.
  • **Blue: **This is the current result of the app. In fact we **did **change the background from red to blue on purpose to fail the tests.
  • Purple: Here every pixel that differs from the expected result is painted in purple. Since the entire current screen looks different from the expected screen, it got fully highlighted.

#testing #ios #snapshot

Snapshot testing on iOS
1.45 GEEK