Search here for all the info you want in this Blog

Showing posts with label Value. Show all posts
Showing posts with label Value. Show all posts

Descriptive Programming (DP) vs Object Repository (OR)

if you ask the difference between object repository and descriptive programming or advantages and disadvantages of both.

everybody will see it in their own view, both has its own advantages and disadvantages

 Object Repository:

    QTP identifies the test object properties which it learns while recording and stores the object properties in the object repository.QTP will use these stored properties while executing the recorded script.

Descriptive programming : this a script method where object properties are directly coded  instead of storing it object repository.
There are two types :
  
   * creating decription object using create.description()
   *You list the set of properties and values that describe the object directly in a     
       VBScript statement

 Advantages of DP over object repository:
 
 a) It is tedious to maintain the object repository, when the size increases.
 b) We have to cautious will using shared repository, if any changes made it will 
     affect  all the tests associated with it.
 c) OR will be time consuming to maintain.





About Outputting Values


An output value is a step in which one or more values are captured at a specific point in your test or component and stored for the duration of the run session. The values can later be used as input at a different point in the run session.

Output Value Categories

You can create the following categories of output values:
  • Standard Output Values
  • Text and Text Area Output Values
  • Database Output Values
  • XML Output Values
Standard Output Values
You can use standard output values to output the property values of most objects. For example, in a Web-based application, the number of links on a Web page may vary based on the selections a user makes on a form on the previous page. You could create an output value in your test to store the number of links on the page.
You can also use standard output values to output the contents of table cells.
Tip: You can use standard output values to output text strings by specifying the text property of the object as an output value. This is the preferred way of outputting the text displayed in many Windows applications.
Text and Text Area Output Values
You can use text output values to output text strings displayed in a screen or Web page. When creating a text output value, you can output a part of the object's text. You can also specify the text before and after the output text.
You can use text area output values to output text strings displayed within a defined area of a screen in a Windows application.
For example, suppose that you want to store the text of any error message that appears after a specific step in the application you are testing. Inside the If statement you check whether a window exists with a known title bar value, for example Error. If it exists, you output the text in this window (assuming that the window size is the same for all possible error messages).

Considerations for Using a Text Output Value for Windows-Based Applications
The text-recognition mechanism used when you create a text or text area output value on a Windows-based application may occasionally retrieve unwanted text information (such as hidden text and shadowed text, which appears as multiple copies of the same string).
Additionally, text (and text area) output values may behave differently in different run sessions depending on the operating system version you are using, service packs you have installed, other installed toolkits, the APIs used in your application, and so on.
Therefore, when possible, it is highly recommended to retrieve text from your application window by using a standard output value step to output the value of the object's text (or similar) property.
Note that the above issues do not apply when working with Web-based applications.
Database Output Values
You can use database output values to output the value of the contents of database cells, based on the results of a query (result set) that you define on a database. You can create output values from the entire contents of the result set, or from a part of it. During the run session, QuickTest retrieves the current data from the database and outputs the values according to the settings that you specified.
For more information on database output values
XML Output Values
You can use XML output values to output the values of XML elements and attributes in XML documents.
After the run session has finished, you can view summary results of the XML output values in the Test Results window. You can also view detailed results by opening the XML Output Value Results window. For further information
For example, assume that an XML document in a Web page contains a price list for new cars. You can output the price of a particular car by selecting the appropriate XML element value to output.