/imgDiff

🚦 Compares two images and prints max pixel difference.

Primary LanguageSwift

imgDiff

Fastlane Swift Version Platform Twitter

When you use iOSSnapshotTestCase (previously named FBSnapshotTestCase) it can be difficult to understand which perPixelTolerance you should define. This tiny util can help you to compare two images in the same manner as iOSSnapshitTestCase does that. And then you can tune the perPixelTolerance in your tests for sure.

Install:

Firstly, you should install Fastlane. And then go on to Usage topic.
You can find information about Fastlane here.

Usage:
$ bundle exec fastlane imgDiff one:your_img_path1 two:your_img_path2
// 🚦 Max pixel difference: 0.2705

Author

Vyacheslav Khorkov, artfintch@ya.ru