Sunteți pe pagina 1din 1

Understanding Checkpoints

QuickTest enables you to add checks to your test or component. A checkpoint is a veriIication point that
compares a current value Ior a speciIied property with the expected value Ior that property. This enables
you to identiIy whether your application is Iunctioning correctly.
A checkpoint compares the value of an element captured when the obfect was saved in the obfect
repository, with the value of the same element captured during the run session. This helps you determine
whether or not your application is functioning correctly.
hen you add a checkpoint, QuickTest adds a checkpoint to the current row in the Keyword View and
adds a heck heckPoint statement in the Expert View. By deIault, the checkpoint name receives the
name oI the test object on which the checkpoint was created. You can choose to speciIy a diIIerent name
Ior the checkpoint or accept the deIault name.
hen you run the test, QuickTest compares the expected results oI the checkpoint to the current results. II
the results do not match, the checkpoint Iails. You can view the results oI the checkpoint in the Test
Results window.
Tip: You insert a checkpoint step by choosing the relevant checkpoint option Irom the Insert menu while
creating or modiIying your test. (You can insert bitmap checkpoints only during a recording session, or
Irom the right-click menu in the Active Screen.) You can also use the heckProperty method and the
heckItemProperty method to check speciIic property or item property values. For more inIormation,
see the ! QuickTest !rofessional Obfect Model Reference.
Note: II you want to retrieve the return value oI a checkpoint (a boolean value that indicates whether the
checkpoint passed or Iailed), you must add parentheses around the checkpoint argument in the statement
in the Expert View. For example:

a Browser("MyBrowser").Page("MyPage").Check CheckPoint("MyProperty")
To insert an existing checkpoint in your test:
1. isplay the action in which you want to insert the checkpoint and select the step aIter which you
want to insert the checkpoint.
2. Select Insert > heckpoint > Existing heckpoint. The Add Existing Checkpoint dialog box
opens.
3. II the %estObjects tree is displayed, select the object Ior which you want to insert a checkpoint.
Otherwise proceed to step 4.
4. From the heckpoints list, select the checkpoint that you want to insert Ior the object displayed
in the %est object box.
5. Click OK. The checkpoint is inserted aIter the current step.

S-ar putea să vă placă și