This benchmark evaluates the performance of four npm packages for image comparison: looks-same, pixelmatch, resemblejs, and blink-diff.
It focuses on execution speed across diverse test cases, including real-world web comparisons and synthetic examples.
- Web Avg Diff (672x623):
Aggregates failed web page comparisons from our production projects using Testplane for e2e testing.
Represents 103,142 real-world UI mismatches (e.g., layout shifts, rendering errors). - Web Avg Success (656x547):
Derived from 6,282,752 successful comparisons in production.
Tests speed for "no difference" scenarios common in regression testing workflows.
- Equal Images (1000x1000): Baseline test with identical images.
- 1% Visible Diff (1000x1000):
Human-noticeable differences (ΔE ≥ 2.3 in CIEDE2000). - 10% Visible Diff (1000x1000):
Larger-scale variations with the same perceptual thresholds. - Full Max Diff (1000x1000):
All pixels altered (maximum difference) to stress-test worst-case performance.
-
Demonstrative Example (896×784):
Real-world UI comparison with an 8% visible difference: a button intentionally recolored to a human-noticeable shade.
Provides visual intuition for typical failure scenarios.
See results.md for execution times across all test cases.
- Clone the repository:
git clone git@github.com:gemini-testing/looks-same.git
- Navigate to "benchmark" directory:
cd looks-same/benchmark - Install dependencies:
npm install
- Run the benchmark:
npm start

