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
npm install codeceptjs-pixelmatchhelper
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
8 Stars
30 Commits
4 Forks
4 Watching
1 Branches
2 Contributors
Updated on 07 Jun 2024
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-18%
324
Compared to previous day
Last week
-4.9%
1,641
Compared to previous week
Last month
10.2%
6,746
Compared to previous month
Last year
250.8%
66,228
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
Found 2/28 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- 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
16 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
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