New UI Test Automation Model

Gil Zur
2 min readAug 5, 2023
Photo by Михаил Секацкий on Unsplash

A feeling that has accompanied me for years in the field of automation.

UI tests are unstable, difficult to maintain and do not provide sufficient coverage for manual tests.

Always but always the same discussions — “You must improve the report, it is not clear”, “Why does this test fail all the time”, “We must expand the coverage”, “Let’s look for more tools that will give us a better answer”… more and more…

The problem is not the tools, not the programming language, not the developers and not the manual testers who try to understand the reports.

The problem is with the existing models such as the Page Object model and others.

Get straight to the point?

So, what are the pains we have today? There are five main pains:

• Code duplication and in most cases very sensitive to changes

• Too low and slow coverage

• Unclear reports, the contexts are not clear

• Maintenance, oh how tiring it is

• Logs do not help, you still need to debug

How do we solve these pains?

Mirror Model

The goal is to produce a model that completely simulates the behavior of the system without any dependence on the test but dependence only on the requirements.

Example:

Let’s imagine that the system under test is a shopping site.

Like every website there is a login screen where we have the following elements:

1. Username field

2. Password field

3. Login button

So how do you implement a simple login test in the mirror model?

The test as a whole ask to login with a username and password (valid or invalid, depending on what was selected from the DB). All the asserts of the flow are done according to the requirements and without any intervention of the test.

After Login button was pressed the suitable event was raise with the relevant data (from Automation’s DB or state of the UUT).
From this point the automation’s infra pass or fail the test according to the requirements.

Are there any changes in the requirements? You don’t have to change the test, just replace the appropriate functionality (all the tests that go through this flow will already adapt themselves).

Interested in an additional information or advice?

https://www.linkedin.com/groups/12877755/

gilz1407@gmail.com

--

--

Gil Zur

Imagine a world where QA & QA automation become an elite unit and central screw in the organization.