Page tree
Skip to end of metadata
Go to start of metadata

Last updated: May 31, 2020 12:19

Build robust and efficient testing frameworks, according to best practices


This guide is the first of a series of guides, for web and mobile applications, that take you through an empty MobileCloud project and continue all the way through to building a complete testing framework.

Design pattern concept

The main idea behind the Page Object Model (POM) design pattern, is to create an Object Repository for the pages in our application/website, which we will then used in the tests. In other words, instead of including the page elements and the test code together within the test, we separate them into 2 different entities: the pages and the test flows. Using this concept, each page in the application will have a corresponding page class. The page classes will identify the elements in the page and contain methods that perform operations on these page elements.

Benefits

  • Maintainable and Reliable
    • POM design pattern uses class hierarchy for common components
    • Each element in the entire application/website is mapped exactly once
    • Reduces code and code duplication
    • UI change fixes done in one place
  • Readable, Modular and clear
    • Strict separation between test flows and app views, allows to create any test flow with the existing repository
    • Any change in the app causes a change only in one place (repository)
    • POM repository is not framework dependent

Prerequisites

  1. Eclipse with Perfecto Mobile plugin and lab access

* Continue to the next posts in this series to see a complete example with code snippets.