Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on Descriptive Programming within the QTP forums, part of the Software Testing category; Why you are Using Descriptive Programming instead of Using Object Repository? (Here my Question is "Why" not What) Regards, Prashanth Chenna, shanthc@yahoo.com...
|
|||||||
|
|||
|
Descriptive Programming
Why you are Using Descriptive Programming instead of Using Object Repository?
(Here my Question is "Why" not What) Regards, Prashanth Chenna, shanthc@yahoo.com |
| Sponsored Links |
|
|||
|
Re: Descriptive Programming
hi,
as per my view descriptive programming can be used to perform the action of the object which is not included in object repository Thanks Deepasree |
|
|||
|
Re: Descriptive Programming
Hi,
What is Descriptive Programming? QTP can perform some action on objects at run time only when it is able to uniquely identify the object. In order to identify the object at run time (play back), QTP learns some physical properties of the object at the time of recording and stores them in object Repository (OR). When QTP runs the script, it compares these properties and values to the actual objects appearing in the application, and performs the action on the object if it finds it. Thus, it is not possible for QTP to perform action on objects during run time if the objects are not there in OR. But descriptive programming provides a way to perform action on objects which are not in Object repository. We can instruct QTP to perform methods on the objects that are not there in object repository with the help of programmatic description or descriptive programming. When and Why to use Descriptive programming? When using Descriptive Programming (DP), we’re bypassing the native object repository (OR) mechanism which may have many advantages. Let’s examine the situations in which the OR’s advantages are outweighed by the DP. Suppose we are testing the site that displays the list of users whose details matches with the search criteria that is entered in search text field. With the names, the application also displays checkboxes against each name. Now, we want to test the scenario where application sends mail to all the users whose names are displayed in the list. But we are not sure how many check boxes will be displayed on the page as the search criteria can differ . In this situation, you can use a programmatic description to instruct QuickTest to perform a Set “ON” method for all objects that fit the description: HTML TAG = input, TYPE = check box The other usage of DP can be as follows: 1) Programmatic descriptions can be used to perform the same operation on several objects with certain identical properties, or to perform an operation on an object whose properties match a description that is determined dynamically during the run session. 2) One place where DP can be of significant importance is when you are creating functions in an external file. You can use these function in various actions directly, eliminating the need of adding object(s) in object repository for each action [If you are using local object repository] 3) The objects in the application are dynamic in nature and need special handling to identify the object. The best example would be of clicking a link which changes according to the user of the application, Ex. “Logout 4) When object repository is getting huge due to the no. of objects being added. If the size of Object repository increases too much then it decreases the performance of QTP while recognizing a object. 5) When you don’t want to use object repository at all. Consider the following scenario which would help understand why not Object repository Scenario 1: Suppose we have a web application that has not been developed yet.Now QTP for recording the script and adding the objects to repository needs the application to be up, that would mean waiting for the application to be deployed before we can start of with making QTP scripts. But if we know the descriptions of the objects that will be created then we can still start off with the script writing for testing Scenario 2: Suppose an application has 3 navigation buttons on each and every page. Let the buttons be “Cancel”, “Back” and “Next”. Now recording action on these buttons would add 3 objects per page in the repository. For a 10 page flow this would mean 30 objects which could have been represented just by using 3 objects. So instead of adding these 30 objects to the repository we can just write 3 descriptions for the object and use it on any page. 6) When you want to take action on similar type of object i.e. suppose we have 20 textboxes on the page and there names are in the form txt_1, txt_2, txt_3 and so on. Now adding all 20 the Object repository would not be a good programming approach. Thanks G K |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Descriptive Programming | thotaravikiran | QTP | 12 | 09-02-2009 04:44 AM |
| Descriptive Programming - Web Application | vikwin | QTP | 1 | 08-11-2008 01:35 AM |
| QTP Script to descriptive programming | niturao | QTP | 3 | 05-28-2008 04:47 PM |
| Descriptive Programming | ramyamca1984 | QTP | 1 | 04-04-2008 08:30 AM |
| QTP DEscriptive Programming | balajimaddy | QTP | 2 | 12-21-2007 10:17 AM |