Gathering detailed insights and metrics for codeceptjs-pixelmatchhelper
Gathering detailed insights and metrics for codeceptjs-pixelmatchhelper
Gathering detailed insights and metrics for codeceptjs-pixelmatchhelper
Gathering detailed insights and metrics for codeceptjs-pixelmatchhelper
A CodeceptJS helper that integrates pixelmatch image comparison for automated, visual regression tests.
npm install codeceptjs-pixelmatchhelper
Typescript
Module System
Node Version
NPM Version
70.1
Supply Chain
94.1
Quality
75
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
8 Stars
30 Commits
5 Forks
2 Watchers
1 Branches
2 Contributors
Updated on Jun 07, 2024
Minified
Minified + Gzipped
Latest Version
1.0.6
Package Id
codeceptjs-pixelmatchhelper@1.0.6
Unpacked Size
35.23 kB
Size
10.38 kB
File Count
4
NPM Version
8.18.0
Node Version
16.17.0
Published on
Feb 09, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
3
Integrates visual regression tests in → CodeceptJS using the → pixelmatch library. It works with all current CodeceptJS drivers: Playwright, Webdriver, Puppeteer, Appium, TestCafe.
Two screenshots are compared for differences, using a custom tolerance. When both images are equal enough, the test passes. When there are too many differences, the test fails.
Comparison is done in memory on your machine by comparing pixel details. The images are not rendered into a hidden canvas, no data is sent or loaded to any web service.
This helper can be used with NodeJS Workers to enable → parallel testing in CodeceptJS.
The flexible matching logic can recognize and match multiple base images for a single screenshot. This is very helpful if you have slight pixel variations between two devices or browsers: Provide one base image for every browser or device and finally prevent false failures!
This package is open-source and only relies on other (free) open-source packages!
You can define a bounding rectangle, as well as multiple ignore-areas to only compare pixels that are relevant for the test.
When using a bounding rectangle or ignore-areas, the library accurately counts relevant pixels to calculate the total difference between both images. Every pixel that's outside the bounds or inside an ignored area is not included in that calculation.
Browse the GitHub Wiki to learn everything about this library. Also, the code is clean, short and contains inline comments to document the behavior.
Install the package. → Details
1npm install codeceptjs-pixelmatchhelper
Include the helper in your codecept.json
config file. → Details
1helpers: { 2 PixelmatchHelper: { 3 require: "codeceptjs-pixelmatchhelper" 4 } 5}
Use → checkVisualDifferences()
to compare your images.
1// Compares the two images to determine if they are identical. 2// 3// Actual image: output/screenshot.png 4// Expected image: screenshots/base/screenshot.png 5// 6// Note: You need to create those two images before running the 7// test. For example by using I.takeScreenshot("screenshot.png") 8await I.checkVisualDifferences("screenshot.png");
Browse the full package documentation inside the → GitHub wiki!
Found an issue? → Report it via GitHub!
Want to contribute? → Read our guide!
codeceptjs-resemblehelper
.pixelmatch
, it's a great library to learn fromNo vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 2/28 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
19 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More