Design Patterns in Test Automation

In the past chapters, we learned about gestures and how to implement gestures in mobile automation. Until now, we have learned almost all the major aspects of Appium, right from understanding the app to writing a basic test in cucumber and automating it. If you notice the code we have written, we can see elements of repeatability and lack of structure and design in the whole approach. There are a couple of design patterns that are used in test automation framework, and some of them are s, Singletons, Facades, Strategy design patterns, and so on.

In this chapter, we will take a look at the very popular and widely used design pattern as well as the most fundamental aspect of test automation which is assertion:

  • Page Object pattern
  • Implementing assertions

Before we get on to the concept of the Page Object pattern, let's do one more round of refactoring and introduce the concept of BaseSteps, the same is illustrated below.

We will implement this in the current state of automation to give it a more structured and organized look. Let's start with understanding the Page Object pattern concept.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.237.79