SOFTWARE TESTING: October 2011

Saturday, October 29, 2011

Working with the Java Add-in in QTP

When learning objects and running steps on Java applications in QTP, consider the following:


  • After installing the Java Add-in, Java applets and applications will always open with Java support active. You can confirm that your Java environment has opened properly by checking the Java console for a message similar to the following confirmation message: “Loading QTP Java Support (version x.x.x.x) (<App> version x.x.x.x).” (where <App> is IE, IBM, or SUN).

  • You can use the Object test object property to activate only public methods and to retrieve only public properties. A recommended alternative to using the Object property is to extend QTP support for the required Java object using QTP Java Add-in Extensibility.

  • You cannot add SWT-based JavaMenu objects directly to an object repository using the Add Objects to Local button in the Object Repository window or the Add Objects button in the Object Repository Manager. If you want to add an SWT-based JavaMenu object to the object repository, you can use the Add Objects or Add Objects to Local button to add its parent object and then select to add the parent object together with its descendants. Alternatively, you can add a JavaMenu object using the Navigate and Learn option in the Object Repository Manager.
  • In QTP, table data is always loaded from the application itself, even if the Active Screen contains an image of the table. For this reason, you must first open the table in the application before creating a table checkpoint in a test. In some cases you may have to scroll to the last row of the table to make sure that all the data is loaded. It is not necessary to open the table in your application to edit an existing table checkpoint.
  • If you load or unload an add-in that is displayed as a child of the Java add-in in the Add-in Manager, only applications that are opened after loading or unloading the add-in are affected.

Friday, October 28, 2011

The Basics


When users interact with computers, they usually get to some point where the
computer asks them for information. That information is stored or manipulated by
the computer in some way. Suppose, for example, that you want to keep a record
of the number of times the user has clicked the button. In that case, you would
want to store a value in memory. In any ca se, you need a  "container" in which to
store information. Programmers commonly call these containers variables.

What is a variable?
A variable is a virtual container in the computer's memory or convenient
placeholder that refers to a computer memory location where you can store
program information that may change during the time your script is running.
Where the variable is stored in computer memory is unimportant. What is
important is that you only have to refer to a variable by name to see or change its
value. In VBScript, variables are always of one fundamental data type, Variant.
A computer program can store information in a variable and then access that
information later by referring to the variable's name.

Variables Naming Restrictions
Variable names follow the standard rules for naming anything in VBScript. A
variable name:
Must begin with an alphabetic charact er.
Cannot contain an embedded period.
Must not exceed 255 characters.
Must be unique in the scope in which it is declared.
Make sure you never create variables that have the same name as keywords
already used by VBScript. These keywords are called reserved words and
include terms such as Date, Minute, Second, Time, and so on.
How Do I Create a Variable?
When you create a variable, you have to give it a name. That way, when you need
to find out what's contained in the variable, you use its name to let the computer
know which variable you are referring to. You have two ways to create a variable.
The first way, called the explicit method, is where you use the Dim keyword to tell
VBScript you are about to create a variable. You then follow this keyword with the
name of the variable. If, for example, you want to creat e a variable called
Quantity, you would enter

Related Posts Plugin for WordPress, Blogger...