Visual regression testing is a process of comparing the snapshots of the current execution with here successful execution that happened earlier. If there is a difference between the snapshots then the test will fail if both the snapshots are the same then the test will pass.
By comparing the visual screenshots you can find out the UI bugs.
Percy is a platform where the team can review the snapshots of the execution and approve them. Percy is a platform to collaborate with other team members for getting approvals for the snapshots of the execution.

Percy supports all the modern tools of the node.js platform
To use Percy, we have to create an account in Percy and then we have to generate a token, Which we will supply during our execution.






npm install --save-dev @percy/cli @percy/puppeteer
const puppeteer = require('puppeteer');
const percySnapshot = require('@percy/puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('http://example.com/', { waitUntil: 'networkidle2' });
await percySnapshot(page, 'Example Site');
await browser.close();
})();
To run the code using the below command.
percy exec -- node script.js
You can check the Percy website for the snapshot.
I am Pavankumar, Having 8.5 years of experience currently working in Video/Live Analytics project.