This project was build to serve as a guide using the backstopJS tool which is used to perform visual tests and detect if there were changes at the level of the front-end objects, it has four scenarios which performs the validation of:
- A single object on the page
- Complete capture of the page by removing an object from the page.
- Clicking on a link before the screen capture
- Login by entering username - password and clicking on the login button and then taking the screenshots.
git clone https://github.com/camhost01/BackstopJS_Practice.gitmove to the folder
cd BackstopJS_PracticeInside this folder you will find the images against which you will contrast the execution of the test cases.
Json with scenarios[] section who has the four test scenarios
Scripts to run through npm run

Delete folder bitmap_test or bitmap_reference
npm run clean:bitmaps_testnpm run clean:bitmaps_referenceExecute all scenarios
npm run scenariosApprove all image reference for the four scenarios
npm run approve_scenariosTo run only one test scenario and not all of them just add
npm run logo_testnpm run scenariosAfter execution, the test report is displayed in your browser, showing the results of the comparison at the top of the page
The reference was taken in that way to generate those test results.
In the report click on the image of "DIFF" section
And move the "Scrubber" to watch the difference between reference and test image