2 Comments
User's avatar
Konstantinos Nikoloutsos's avatar

Great article George, I want to emphasize my question on "Leaves no ambiguity to the developers".

A function name and parameters in the Page Object Pattern may not be enough for the developer to understand what it is requested. In that case do you write comments next to the method or you use a different way?

On top of that, to make it more practical, for example assume you have a screen with 3 labels and we want to assert them. According on PageOP you would write something like:

robot

.assertLabel1(is: "1")

.assertLabel2(is: "2")

.assertLabel3(is: "3")

Now the developer clearly understands what happens but the time performance of the UITest is not good. It's not good because we cannot let the system check the predicates in parallel. Instead we check them sequentially (Check this (speed section) https://medium.com/trendyol-tech/how-to-make-ios-ui-testing-fast-and-reliable-6f572a0955f2 )

So how do you tackle this problem. Would you sacrifice readability over performance, or the other way around?

Expand full comment
Georgios Sotiropoulos's avatar

Hey Konstantine!

The developers need to review the UI tests in the specs MR and raise there any question. A good thing thing about clarifying things that way is that the developers are already familiar with the process in a tool they use every day.

Regarding the question of performance vs readability, well in general readability is the first goal when writing specs. Even at a loss in performance. Having said that, any way to keep readability and also increase the performance should be seriously taken into account as you correctly imply slow UI tests quickly become obsolete.

P.S. Very interesting idea the one you shared! I will explore this further and come back if I can find anything that also does not sacrifice readability.

Expand full comment