Webotest is an npm package - automated web test, used to compare two website page screenshots - local (unpublished) un public (published).
Focusing developement on multipage CMS websites (likeEPiServer CMS
, where CMS pages are part of website's navigation.
You need to have installed npm and Node.js on your machine.
Website navigation structure has to be identical to run successful test - otherwise there is no use to run tests, as they won't bring up the necessary and proper results.
Only publicly available pages will be read in website navigation to create comparement.
NOTE: Using hyperlink `<a></a>` href data to get hierachical structure of website.If none of the hyperlinks are detected, test won't return expected results.
NOTE: Internet connection failures can cause screenshot making issues.
npm install webotest
Package's current version works only with npm2.Working to support it on npm3.
Run tests in console from webotest directory, for example:
This directory also is, where all test results are saved.
There is only one command to run webotest:
node web-tester.js --localUrl= --publicUrl=
node web-tester.js --localUrl= --publicUrl=node web-tester.js --localUrl= --publicUrl=node web-tester.js --localUrl= --publicUrl=etc.
! Always write down the protocol as shown in example, otherwise tests won't be run.
! Remember to keep in sync content between local and public websites and identical navigation structure (links), as webotest relies on that. Again, great and developed to work with websites created on EPiServer CMS basis, as it allows to import/export website contents.
To prevent unwanted changes in website design, ease job with bug reports - just check localhost:8082 after you get notification "Listening to localhost" in console.
! Note, that html files can be overviewed in browser while local server is running, as they are created dynamically and get data from server side.
Main directory (created based on test date) with four subdirectories:
Local site and public site subdirectories contain:
This project is licensed under the MIT License.
Other npm packages also were used, to make things happen, check the
package.json file to see the list of dependencies and under