Wednesday, July 16, 2008

Parameterizing Values

  • You can use the parameter feature in QuickTest to enhance your test by parameterizing the values that it uses. A parameter is a variable that is assigned a value from an external data source or generator.

There are four types of parameters:

  • Test/action parameters. Test parameters enable you to use values passed from your test. Action parameters enable you to pass values from other actions in your test.
  • Data Table parameters. Enable you to create a data-driven test (or action) that runs several times using the data you supply. In each repetition, or iteration, QuickTest uses a different value from the Data Table.
  • Environment variable parameters. Enable you to use variable values from other sources during the run session. These may be values you supply, or values that QuickTest generates for you based on conditions and options you choose.
  • Random number parameters. Enable you to insert random numbers as values in your test.

Using Regular Expressions

  • Regular expressions enable QuickTest to identify objects and text strings with varying values. You can use regular expressions when:
  • Defining the property values of an object in dialog boxes or in programmatic descriptions
  • Parameterizing a step and creating checkpoints with various values
  • QuickTest treats all characters in a regular expression literally, except for the period (.), hyphen (-), asterisk (*), caret (^), brackets ([ ]), parentheses (()), dollar sign ($), vertical line (), plus sign (+), question mark (?), and backslash (\). When one of these special characters is preceded by a backslash (\), QuickTest treats it as a literal character.
    Using the Backslash Character ( \ )
  • Matching Any Single Character ( . )
  • Matching Any Single Character in a List ( [xy] )
  • Matching Any Single Character Not in a List ( [^xy] )
  • Matching Any Single Character within a Range ( [x-y] )
  • Matching Zero or More Specific Characters ( * )
  • Matching One or More Specific Characters ( + )

Analog and Low Level Recording

Analog Recording

  • Use analog recording for applications in which the actual movement of the mouse is what you want to record. These can include drawing a mouse signature or working with drawing applications that create images by dragging the mouse.
  • You can record in Analog Recording mode relative to the screen or relative to a specific window.

Low Level Recording

  • Use low-level recording for recording on environments or objects not supported by QuickTest.
  • Use low-level recording for when you need to record the exact location of the operation on your application screen. While recording in normal mode, QuickTest performs the step on an object even if it has moved to a new location on the screen. If the location of the object is important to your test, switch to Low Level Recording to enable QuickTest to record the object in terms of its x- and y- coordinates on the screen. This way, the step will pass only if the object is in the correct position.
  • Low-level recording supports the following methods for each test object:
  • WinObject test objects: Click, DblClick, Drag, Drop, Type
  • Window test objects: Click, DblClick, Drag, Drop, Type, Activate, Minimize, Restore, Maximize