Associated function libraries

Relevant for: GUI tests and components

After you create your function libraries, you associate them with your test or application area. This enables you to insert a call to a public function or subroutine contained in the associated function library from a test or component associated with that application area.

At the beginning of a run session, UFT loads the function libraries associated with the test or application area, and can then access their functions during the run session. Public functions stored in function libraries can be called from any associated test or component, whereas private functions can be called only from within the same function library.

The order in the list of associated function libraries determines the order in which UFT searches for a function or subroutine that is called from a step in your test or component. If there are two functions or subroutines with the same name, UFT uses the first one it finds. When UFT searches for the function, it searches from the bottom of the list upwards to find the function.

For details, see Manage function library associations.

To use a function library without associating it to your test or application area, you can load the function library dynamically during a run session using the LoadFunctionLibrary statement. If you dynamically load a function library during a run session, and a later step calls a function that has the same name as a function in an associated function library, the function in the dynamically loaded function library is used.

When working with ALM and associated function libraries, you must save the function library in the Test Resources module in your ALM project before you can associate it with the test or application area. You can add a new or existing function library to your ALM project.

If you add an existing function library from the file system to an ALM project, you are actually adding a copy of that file to the project. Therefore, if you later make modifications to either of these function libraries (in the file system or in your ALM project), the other function library remains unaffected.