Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ebazhanov/cypress-image-screenshot-comparison

screenshot comparison + Cypress + Mochawesome report + CircleCI
https://github.com/ebazhanov/cypress-image-screenshot-comparison

circleci cypress cypress-visual-regression mocha mochawesome screenshot screenshot-comparison screenshot-testing snapshot-testing visual-regression-testing

Last synced: 3 months ago
JSON representation

screenshot comparison + Cypress + Mochawesome report + CircleCI

Awesome Lists containing this project

README

        

# Cypress visual regression example (screenshot comparison)
> This repo an example of how to use Cypress Image Snapshot plugin

[![NPM][npm-icon]][npm-url]

## Image Diff

![diff-example.png](diff-example.png)

## Mochawesome report

- [from CircleCI link](https://38-248710227-gh.circle-artifacts.com/0/mochawesome-report/mochawesome.html)

#### TODO
- [x] integrate with CircleCI
- [x] add mochawesome html
- [ ] add failed screenshot to mochawesome html report
- [ ] play with `Threshold` to make tests stable in circleic
- [ ] find the way of making full screenshot
```javascript
addMatchImageSnapshotCommand({
failureThreshold: 0.03, // threshold for entire image
failureThresholdType: 'percent', // percent of image or number of pixels
customDiffConfig: { threshold: 0.1 }, // threshold for each pixel
capture: 'viewport', // capture viewport in screenshot
});
```

## CircleCI [![CircleCI](https://circleci.com/gh/Ebazhanov/cypress-visual-regression-example.svg?style=svg)](https://circleci.com/gh/Ebazhanov/cypress-visual-regression-example)
#### An example of screenshot diff [here in circleci job](https://20-248710227-gh.circle-artifacts.com/0/cypress/snapshots/failed.test.js/__diff_output__/Visual%20regression%20tests%20--%20should.diff.png)

[npm-icon]: https://nodei.co/npm/cypress-image-snapshot.svg?downloads=true
[npm-url]: https://www.npmjs.com/package/cypress-image-snapshot