What setup is needed for Keyword Driven Testing in QTP
Prior to beginning the keyword-driven testing, it is essential that some of the expert automation engineers are entrusted the task of creating a dedicated test automation setup or automation infrastructure which will be shared by all the tests pertaining to the particular application or its functionality.
The key elements of the automation infrastructure are basically a group of function libraries along with shared object repositories. Once the test automation infrastructure is created, the process of building keyword-driven tests can be started by the application testing engineers by choosing objects and desired keywords from the Keyword View. The Keyword View helps us in creating and viewing various steps of our test in a keyword-driven, tabular or modular form.
Process of creating a Shared Object Repository:
Following steps are used to create shared object repository for testing automation setup:
1) Adding or learning different type of objects from the application.
2) Creation of new objects if they are present in the application under test. We can review the values & properties of such new objects as & when desired.
3) It is of prime importance that all objects in the object repository have easily identifiable & unique names designated by following recognized object naming conventions. This will help the automation engineers to easily recognize these objects without any ambiguity.
4) If desired various objects can be moved or copied from one object repository to another.
5) Application test engineers can merge various objects added to the local repositories with the shared object repositories belonging to the automation infrastructure. If need be two or more already available repositories can also be merged together.
Process of Creating a Function Library:
Following steps are used to create function libraries for testing automation setup:
1) Identify the desired keywords.
2) Using the Function Library window of QTP, we need to create the function library files & edit them if need be.
3) Next step is to create the desired functions having full function definitions including their header information within the function libraries. This task can be done either manually, or with the help of Function Definition Generator.
4) Then we need to define the functions as either new ones or being replacement methods for our test objects.
5) Debugging our function libraries as & when need arises.
Many More articles on Test Automation Frameworks
An expert on R&D, Online Training and Publishing. He is M.Tech. (Honours) and is a part of the STG team since inception.