Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Our team develops automation solutions for various web based products.

I'd like to compile a list of patterns and best practices from the GUI web automation space that have been used and proven as successful.

The "Page Object" pattern is one pattern, though I couldn't find any books, articles or blog posts that describe it in detail.

What are other patterns that can be used in order to create automated test cases that act on the application's GUI and that are robust and stable?

share|improve this question
You mean architectural patterns like PageObject or good automation practicies like this? – dzieciou Jan 13 '13 at 17:35
Isn't the 'best practice' not to automate at the GUI which might explain why you find few patterns... – Phil Kirkham Jan 14 '13 at 12:40
@PhilKirkham Automating at the GUI level can have benefits, particularly in regression testing or acceptance testing. I wouldn't say to do no automated GUI testing. – joshin4colours Jan 16 '13 at 16:42
I asked a similar question some time ago… – oldbam Mar 11 '13 at 15:22
I don't see any reference to Page Object in the link provided – ilm Feb 28 at 5:09

First of all I would recommend to read about the Testing Pyramid (if you do not know it yet); in a nutshell, do not create more than 10% GUI Tests.

Furthermore, I recommend these two articles from Gojko Adzic:Ui Testing without shooting yourself and Effective User Interface Testing

In our current project we (unfortunately) have a lot of GUI Tests. What helped us a lot to get those more stable and reduce fixing time, is to raise the level of abstraction. First, you have your page objects (one object is dedicated to one page/tab). After that, create workflows that represent a certain functionality and thereby can be reused in several tests, e.g. Login.

GUI tests tend to take more time to complete, so if something happens at the very beginning, it might be possible that it still fails after 10 minutes (timeout). Therefore we introduced checkpoints; those represent a certain state (e.g. in the database) and have to be reached after a defined time. E.g. one checkpoint polls the database for the field "order" and if that field is still empty after 2 minutes, the test fails. Thereby you save time by failing faster.

share|improve this answer

The page object pattern is a pretty simple concept, not nearly enough meat on it for an entire book, although I could definitely see a book about UI automation that included it. This blog post has some good information about it:

As for other best practices, see this answer and the linked presentation/examples: Good resources/tutorials/tips for beginner doing automation?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.