http://s30.postimg.org/mk2xbzd7z/dashboard.png
http://s30.postimg.org/rhghx3f73/comparison.png
Needed a nice tool to allow easy Visual regression testing of HTML/CSS/JS modules. No more asserting class names, run your tests, post the base64 screenshots and get immediate feedback within your tests as to whether the difference is acceptable or not.
The first time an image is posted to the application it will specify it as a baseline and after that the application will compare submitted images against the saved baseline for the submitted ID. When submitting an image you need to specify a name/id to group images. The application then uses that ID to either baseline the image (if its the first time the ID has been used) or to find the baseline to compare against.
- Clone the repository and then run
cd scholar
. - Run
npm install
. - On a locally running mongodb server, create the "scholar" database with user/password "scholar/kernel" (configurable with "api/config/default.js" as required).
- On Mongo 2.6 and up you can do this by in your terminal running:
mongo scholar --eval "db.createUser({ user: 'scholar', pwd: 'kernel', roles: ['readWrite', 'dbAdmin'] } )"
- Or if that gives errors around the command:
mongo scholar --eval "db.addUser({ user: 'scholar', pwd: 'kernel', roles: ['readWrite', 'dbAdmin'] } )"
- On Mongo 2.6 and up you can do this by in your terminal running:
- To start the application run
npm start
or if you havepm2
globally installed, runpm2 start api/server.js --name scholar
. - To view the application and the submitted screenshots go to
http://localhost:8080
. There won't be anything to view the first time you load the application! - The first time any tests run all they should pass as the images are being baselined. On subsequent runs they should pass/fail depending on whether the website has changed since the baseline was taken.
Go over to Scholar Runner and take a look! It's actively being developed right now and as such, may change in future however as of now the outside usage of it should remain stable. Feature requests, pull requests and suggestions are more than welcome!