O'Reilly logo

TestComplete Cookbook by Gennadiy Alpaev

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Structuring code using loops

In the Modifying the recorded test recipe in Chapter 1, Getting Started, we have briefly dwelled on the topic of loops, having used the for loop for clicking several buttons. In this recipe, we will consider this issue in greater detail. Testers who are not familiar with programming, would often make the error of redundantly repeating code. This may relate to recording tests via recorder or with copying blocks of code with further insignificant changes. This is considered to be bad style in programming, because, in the future, when we would need to introduce any changes into the code, we would have to change it in all the places where it had been copied to.

Let's consider such an assignment. We have to create a smoke-test ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required