On 20 April 2015 at 19:30, Cuker
<rahulsh...@gmail.com> wrote:
Just want to know what people using cucumber for a front end project do to test how a website looks. Cucumber scenarios for such projects are mainly functional. So if a link moved from top to bottom the test would still work functionally. Of course one can identify links in selenium using scopes but only for cases where it really matters and even in those cases, the scoping is not too strict. Most of my stakeholders ask QAs to write tests that would tell you if for example a heading was not present or the position of fields in a registration form moved up or down etc. Of course all of these things can be tested in a number of ways but writing tests to such level of detail (for text, images etc) could be an overkill. At the end of the day such requirement only come in from stakeholders because they would like to be alerted if something has changed and not because it is very important for customers in most cases. I know there are tools that would allow screenshots to be compared with baseline images etc. Then there's also an argument that one could test styes by accessing style attributes of the elements. But then again, this can't be done for everything and screenshot comparison doesn't seem a great solution. So, in short, how do people make sure that if Address line 1 moved below Address line 2 in a registration form for example?
Personally I don't, the cost of writing, and even more so, running such tests is just not worth it. Cucumber is best used for validating/assesing the functionality of a website, i.e. WHAT you can do, not HOW you do it.
Fundamentally if you want to ensure you have a pretty and consistent front end you need to have real people using that front end frequently. Some good people to do this are
1. Users, (of course you have to make it easy for them to give you feedback, and reward them for this)
2. Stakeholders, customer, product owner
3. Designers
4. Front end devs
...
A good way to ensure this happens is to deliver to production as frequently as possible.