Tuesday, February 5, 2019

Automation Pain Points II: Resilience Part 3, Selectors

In the last two sections, we looked at strategies that orchestrate the behavior of pages and flows. These have made a huge difference in our day to day work. The third piece requires buy in from dev.

We kept rebuilding page objects, but sorting the new selectors was kind of a nightmare. Just when we thought it was all done, changed again!

We realized that the developer still knows where the first name field is... Or the submit button... Or whatever.

So one of our engineers made this case to dev: We will add selectors to our pages as we normally do. We will also open a ticket to have new properties added to each control. The property name will be 'selenium', so we can have selectors like '[selenium="first-name"]'.

The engineer is responsible for adding those tags. And when the page is changed, they're the ones changing it, and they are required to keep the selenium properties intact as they redesign the page. If a selenium tag disappears, it's a P0 bug, because it blocks testing.

They are not required to put selenium tags on anything we didn't identify as needing them.

This took us from a couple of days before everything was smooth again to a few minutes. Huge benefit!

No comments:

Post a Comment