Geeks Talk

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.

Descriptive Programming

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...

Go Back   Geeks Talk > Software Testing > QTP
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 09-15-2008
Contributing Member
 
Join Date: Mar 2008
Location: Pune
Posts: 30
Thanks: 0
Thanked 13 Times in 8 Posts
chennaprashanth is on a distinguished road
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
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-15-2008
Expert Member
 
Join Date: Apr 2008
Location: Tamilnadu
Posts: 1,465
Thanks: 15
Thanked 150 Times in 141 Posts
deepasree has a spectacular aura aboutdeepasree has a spectacular aura about
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
Reply With Quote
  #3 (permalink)  
Old 09-17-2008
Contributing Member
 
Join Date: Sep 2006
Location: CHENNAI
Posts: 48
Thanks: 5
Thanked 4 Times in 4 Posts
gokulakrishnan_k is on a distinguished road
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
Reply With Quote
  #4 (permalink)  
Old 09-18-2008
Contributing Member
 
Join Date: Mar 2008
Location: Pune
Posts: 30
Thanks: 0
Thanked 13 Times in 8 Posts
chennaprashanth is on a distinguished road
Re: Descriptive Programming

Hi Gokula Krishna,
Thank Q for Ur Valuable Response to my thread.

Regards,
Prashanth Chenna.
Reply With Quote
  #5 (permalink)  
Old 09-18-2008
Junior Member
 
Join Date: Feb 2008
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Gaurang033 is on a distinguished road
Re: Descriptive Programming

1) we can start the automation before the products is available
2) framework demands to use the dp. ( for ex. Keyword driven framework)
Reply With Quote
Reply

  Geeks Talk > Software Testing > QTP

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


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


All times are GMT -4. The time now is 05:05 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved