When to use UFT One automation scripts

Relevant for: GUI tests and components

Creating a useful UFT One automation script requires planning, design time, and testing. You must always weigh the initial investment with the time and human-resource savings you gain from automating potentially long or tedious tasks.

Any UFT One operation that you must perform many times in a row or must perform on a regular basis is a good candidate for a UFT One automation script.

The following are just a few examples of useful UFT One automation scripts:

  • Initialization scripts. The script automatically starts UFT One and configures the options and the settings required for testing a specific environment.

  • Maintaining your tests and components. The script iterates over your collection of tests and components to accomplish a certain goal. For example:

    • Updating values. The script opens each test or component with the proper add-ins, runs it in update run mode against an updated application, and saves it when you want to update the values in all of your tests or components to match the updated values in your application.

    • Applying new options to existing tests and components. When you upgrade to a new version ofUFT One, the new version it offers certain options that you want to apply to your existing tests and components. You can write a script that opens each existing test or component, sets values for the new options, then saves and closes it.

    • Modifying actions and action parameters. You can retrieve the entire contents of an action script, and add a required step, such as a call to a new action. You can also retrieve the set of action parameters for an action and add, remove, or modify the values of action parameters.

  • Calling UFT from other applications. You can design your own applications with options or controls that run UFT One automation scripts. For example, you could create a Web form or simple Windows interface from which a product manager could schedule UFT One runs, even if the manager is not familiar with UFT One.