O'Reilly logo

Advanced UFT 12 for Test Engineers Cookbook by Jonathon Lee Wright, Meir Bar-Tal

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

Building a test controller

In this recipe, we will see how to build a controller for our test automation framework. As outlined in the previous recipe, the controller will load the list of actions, and for each Action, it will import the corresponding datasheet. For each data-driven iteration, it will initialize the Action and invoke its Run method.

Most often, a controller is implemented as a function. Here, we will implement it as a class. The reason is that, this way, we can instantiate a controller during runtime to support dynamic branching of the test flow.

Getting ready

Create a folder structure, as follows:

  • C:\Automation
  • C:\Automation\Data
  • C:\Automation\Lib
  • C:\Automation\Tests
  • C:\Automation\Config
  • C:\Automation\Results
  • C:\Automation\Solutions

Create ...

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