15

There are many testing frameworks out there that utilize interface screenshots for comparison and here’s a library from Facebook specifically for snapshot tests called iOS-Snapshot-Test-Case.

iOS-Snapshot-Test-Case takes a snapshot of the screen when called, compares to a reference image you supply, and if the images don’t match then the test fails.

Orta has released a plugin enhancing Xcode allowing you to quickly see your snapshots within Xcode taken with iOS-Snapshot-Test-Case, and you can see the differences betweenfailed snapshot tests.

Here’s an image showing the plugin in action from the readme:

Snapshots-e1405414240520

You can find the iOS-Snapshots-Test-Case library on Github here.

You can find the Snapshots for Xcode plugin on Github here.

A nice library and plugin to aid in user interface testing.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>