mapbox / mapbox/pixelmatch

Prevent diff to be generated if threashold not reached

Open
#112 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
JavaScript
Stars
7k
Forks
327
PR merge metrics
No merged PRs in 30d

Description

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 ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the binary's screenshot comparison and diff-file output, focusing on how the configured threshold is evaluated. Reproduce a comparison with no differences or a below-threshold difference across the existing screenshot workflow, then verify that no diff file is generated in those cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.