Reader Level:
ARTICLE

Working With Associated Function Libraries in QTP in Testing

Posted by Shekhar Chauhan Articles | Testing November 06, 2012
In this article we discuss how to work with Associated Function Libraries
  • 0
  • 0
  • 3600

QuickTest allows a user to create function libraries containing modules, functions, subroutines, and so forth, and then allow the user to associate the file with your test. This enable user to insert a call to a public function or subroutine in the associated function library from the test. Public functions that are stored in function libraries can be called from any associated test, while private functions can only be called from the same function library.

associate-function-libnraries.JPG

We can specify the default function libraries in QuickTest for all new tests settings dialog box by selecting File > Settings > Resources node. The list of default function libraries is integrated into the test after a test is created. Hence any change in the default function libraries do not affect the existing tests.

test-settings-function-library.JPG
 

How to associate a function library with a test using the Resources pane:

  1. In the sidebar, select the location of the file and browse to and select a function library from that file and click open.
  2. In the Resource pane, right-click on the associated function libraries node and select Associate Function Library. The open Function Library dialog box will open.

The Function library is associated with the test and is displayed as a node under the Associated Function Libraries node in the tree.

How to associate an open function library with a test:

  1. Create or open a function library. Before proceeding to the next step we have to make sure that the function library we want to associate with a test is the active document; we can click the function library's tab to bring it into focus.
     
  2. Save the function library either in the file system or in the Quality center project.

    library-file-location.jpg

     
  3. Now right-click on the function library and select Associate Library or select File > Associate library > Function library. QuickTest associates the function library with the open test.

    associated-library-function.jpg
     

 

COMMENT USING

Trending up