Here is a sample for visual regression testing . We used cypress for faster results, easy-to-use tooling and headless run! More info https://www.cypress.io/
- Run
npm install
- Run
npm start
to a thread to start the node server. - Run to another thread on command line
npm run test:base
- Run
npm run test:actual
- All results are under [cypress/snapshots] folder
- Video of test run is under [cypress/video] folder
Note that if you change the host variable on test:actual
to 'http://localhost:8081/' all tests should pass.
One of the most famous tools for visual regression testing that use AI is Applitools https://applitools.com/!
- Run
npm start
to a thread to run the node server. - You should set your apikey on
applitools.config.js
. Example
module.exports = {
apiKey: 'YOUR_API_KEY',
...
}
- Run to another thread on command line
npm run applitools:base
- Run
npm run applitools:actual
You should see something like this on the platform :