garris / BackstopJS

Catch CSS curve balls.
http://backstopjs.org
MIT License
6.79k stars 606 forks source link

Best practices #1019

Open YogevMagal opened 5 years ago

YogevMagal commented 5 years ago

Hi Garris, I had a look at your Backstop project, it is really cool! I am wondering if you can please share with me some of your thoughts regarding - 

  1. Should we use it to validate the whole web page content as a single screenshot or better to have many individual components?

  2. considering the fact that we have a very complex website, do you recommend uploading the screenshots to our codebase? (for allowing easier code review in bitbucket and comparing images while doing the review) is this a best practice?

  3. Is there any way to handle this as part of the build process?

Thank you!

garris commented 5 years ago

@yogevmagal, thanks for posting. Great questions.

1) i recommend just starting simple. Capture the whole page to start -- capture smaller sections if the big shots are not high enough resolution.

2) yes, save the reference files to source control. Saving test images is probably not useful.

3) many people use backstop for pre- post- commit. Some test between staging and prod. Every system is different so hard to recommend anything specific.

Best of luck getting set up!

adamchenwei commented 5 years ago

@YogevMagal before you choose this library as an option, I would suggest play it around a bit more, especially in larger scale. So far my experience is that it has a very poor test management UI (it has none), but a very nice comparison UI. however, lacking the former makes development experience horrendous and the level of support is offered is below par (https://github.com/garris/BackstopJS/issues/1022) and I would assume the lack of man power on this repo. So that means also do not expect a very high level support is been offered.

Just my two cent after spent many of my days on this library. @YogevMagal @garris

And the ONLY advantage this library has is:

  1. its simple image comparing UI
  2. its ability to excluding DOM

So if you looking for exclusively those above, use it, but if not, there are many other very very developer friendly options, like Cypress, available.

Thanks

YogevMagal commented 5 years ago

Thanks Adam for the feedback. We are already using mocha-chai for testing the functionality of our components and i was looking for some lib that will help us protect visual issues in the layout. I will have a look on your recommendation as well. Thanks

Vitalthorbi commented 5 years ago

BackstopJS is best used for simpler and static pages. On more complex pages, the time you spend trying to remove false positives would negate any advantages to just manually testing. Even on simple pages, you will have to deal with a lot of false positives.

@adamchenwei This is a FREE software. The fact that it exists as is with any support at all is amazing enough. Find a paid alternative if you feel entitled to hand-holding.