The most exhausting part of programming is the testing. Poking at a recently-created program or mobile app to find bugs is time-consuming, frustrating, and never guaranteed to catch problems. If only there was a way to more comprehensively catch bugs.
Well, it turns out there is!
Using a technique called perceptual diffing, you can quickly and easily locate otherwise-invisible bugs. Perceptual diffing compares screenshots of the planned page with the programmed page. By highlighting minute differences in pixels, programmers can find and catch mistakes without painstakingly combing through code line by line.
Perceptual diffing is good for more than just aesthetic input. By highlighting missing buttons, broken roll-over features, and inconsistent text, the technique does all the heavy lifting of manual QA. It's like the difference between sifting for rocks with an actual sifter, versus combing through a sand pile grain by grain.
Niffy: The New Perceptual Diffing Software
The engineers who created Niffy first heard about perceptual diffing on the internet. While the technique was intriguing, no software yet existed that utilized it to its full potential. The team's response was to lay a perceptual diffing option over their browser automation library, Nightmare.
Nightmare and its add-on Niffy can be used with the following steps.
Perceptual Diffing: The Basics
Perceptual diffing has only three main steps.
The capture of screenshots in an app. The differentiation and highlighting of two screenshot sets. The appropriately timed trigger of these steps during the release process. Using Nightmare to Utilize Captured Screenshots
Nightmare makes screenshot capture easy by creating easy-to-follow scripts that generate necessary screenshots. You can customize the scripts with all of the system functions that need screenshotting.
You can't use the difference in pixel values because doing so generates a black image. Instead, Niffy uses a diffing algorithm to copy equal pixels with a partially transparent layer. Then it turns uncovered pixels red.
Timing and Trigger
Triggers and ideal timing will vary wildly based on the project's process. The simplest trigger is to manually run the diffing and then compare plan vs. outcome. It's the easiest way to isolate coding discrepancies.