Chapter 4. Maintaining Test Elements

One day, as usual you report to work where on your way you were planning the next test to automate. Ideas were flowing in your head now that you are satisfied with all the knowledge you have gained so far in Test Studio automation. You reach work with the invincible QA automation engineer attitude and you get called for the testing team meeting. So just when you expect to be praised for having finished the data-driven tests automation before the targeted date, you disappointedly discover the results of yesterday's overnight execution. Most of the test cases crashed when they were run against the latest application build! "You designed the test logic very carefully so it must have been an element recognition problem after the updates of the developers!", you say to yourself. Surely, testing cannot afford test execution crashes with each build so the element recognition for all tests has to be enhanced. As a solution to this problem, this chapter will teach you how:

  • Test Studio understands, interprets, and deals with elements
  • How to manually organize UI test elements
  • How to build flexible find expressions to locate UI test elements

Automation element recognition

As the proverb says, "A chain is only as strong as its weakest link.". In automation, no matter how smartly you devise your tests the element recognition mechanism can still break test execution. Hence, one of the factors for making automated tests robust is the capability to induce unique element identification at runtime. You will not be able to guarantee stable and reliable test executions unless you build a flexible and valid element repository.

In addition to carefully crafting the element's recognition logic, the long term aim is to have the logic behind these elements centralized in one place. This will boost test maintainability and increase the automation return on investment.

The material in this chapter is the common ground for automating any test using Test Studio. The element recognition topic is going to be tackled from its different sides to enable comprehensive decisions when storing elements.

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

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