1) Creating all objects in the object repository with 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. In our application, we can define our object either manually or by using the built-in functionality of QTP. It is essential to ensure that our object repository using the automation infrastructure must have all objects concerned with the tests.
2) Creating special keywords in function libraries at business level & creating their relevant documentation.
Here we develop customized or specialized functions for our application under test. In some cases we may find the need to create special functions to test some functionality of the application not included in the out of the box object model of QTP. We may like to combine different functions & existing methods for creating specialized functions, which would test the sequences or operations commonly, performed in the application. During the stage of test creation, all these newly created functions are available to us as extra keywords or as substitute for keywords already built-in QTP.
Since keyword-driven testing involves more initial time investment & better planning compared to straightaway recording of steps, the process of test creation and maintenance becomes more convenient & efficient. In addition it helps us in maintaining a more readable structure of the tests which can be easily modified at any stage.
We can encapsulate large portion of complex programming within function libraries, and can make such functions quite flexible thereby enabling their use in several testing scenarios. Here an expert on automation can design specialized keywords, while the same can be used in different tests by several application testing engineers with lesser technical expertise.
With this approach we can update our testing functionality without the need to update all the concerned tests utilizing the particular keywords.
For a particular application we include all the relevant objects in single shared object repository, which can be associated with many relevant tests. This helps us in easily reflecting the changes in the object repository without any need for updating all the individual tests.
Once our inventory of object & function library keywords is available, keyword-driven tests can be created by the application testing engineers using such keywords.