pixelmatch icon indicating copy to clipboard operation
pixelmatch copied to clipboard

Prevent diff to be generated if threashold not reached

Open bluepioupiou opened this issue 3 years ago • 2 comments

Hi,

I use pixelmatch to compare the whole bunch of screenshots i've been taking for each version of my product (approx 300 screenshots) I use the binary to test each new screenshots against the previous one. But even if there is no differences (or if the diff threshold ins't reach), I still have a diff file generated which make the tester job quite difficult since he has to go through 300 files, even if there is no différence at all.

Can't you prevent the diff file to be writen if the threshold is not reached ?

bluepioupiou avatar Apr 25 '22 11:04 bluepioupiou

Aren't you able to control this on your side? Run pixelmatch without diff, then run it again if there are differences above the threshold (which shouldn't happen often in tests, so performance isn't a concern)?

mourner avatar Apr 25 '22 14:04 mourner

It could be a workaround indeed. But even with this, how can I tell the diff between the two doff files ?

AndI found it a bit heavy and would prefer if the tool don't generate a file to show that there is no diff...

bluepioupiou avatar Apr 25 '22 21:04 bluepioupiou