User Interface test automation is difficult at the best of times. Your
teams need to work hard to keep automation suites running as smoothly as
possible. Automation test suites need to focus on long-term
maintainability and value since test software should always be treated
with the same care and respect that our production code is treated.
(Because test software is production software!)
struggle with getting stable automation suites in place, especially when
their system’s user interface (UI) is changing. Frustration ramps up as
teams spend more time chasing broken tests, and each change seems to
work only for a few cycles. It’s not uncommon for teams to cut back on,
or entirely abandon, their UI automation efforts.
have to be the case, though! Careful planning and implementation around
element locator strategies can yield incredible results for automation
suites. When I work with teams, I initially focus on element locator
strategies since it’s the first place tests will fail at, especially
when the UI is frequently updating.
In this article I’ll use Selenium WebDriver and Telerik’s Test Studio as
examples; however, the concepts I’m discussing are applicable
regardless of whether you’re using someone else’s commercial tool or any
of the many wonderful open source APIs/drivers available to you.
What’s the Fuss About Locators?
we browse a web page, our eyes guide us to the areas on the page we
need to interact with: headings to read, images to examine, links to
click, input fields to enter text in, etc. When a test automation script
plays back, the underlying drivers/toolset need some way to find those
same elements on the page. Obviously the scripts don’t have eyes, so the
toolset needs another way to handle this.
This article appears in its entirety on Test & Measurement World. To continue reading, click here.