Search This Blog

Friday, January 7, 2011

Checkpoints in QTP

Checkpoint is a verification point in you tests which compares existing value of a property of the object with an existing value. With the help of checkpoint you test that if a property of the object is same or changing.

When you add a checkpoint to your test QTP adds a checkpoint to the current row in keyword view and adds a Check Checkpoint statement to expert view. The name of the checkpoint is by default the name of the object on which checkpoint is applicable.

Why we use checkpoint. When you record a test in your application you simply record various objects & store them in repository but have you done any testing yet…No you haven’t….when you check that if the property of an object is not changing during run time you perform actual test. For this simple reason you insert checkpoints in your test. As application changes vey frequently & you want to keep your test unchanged you apply some checkpoints on object/properties which may change. When you run your test you can checks if Checkpoint Pass/Fail for baseline.

Checkpoints can be inserted using Menu>Insert>Checkpoint or you can use Descriptive Programming for inserting checkpoints in you test.

QTP uses following types of Checkpoints

  1. Standard Checkpoint:  Standard Checkpoints used to check properties of an object.You can apply standard checkpoint on an object & test if a property change during run time. This checkpoint is applicable on variety of objects i.e. List Box, Button, Link, Combo Box, Edit Box etc. With help of this checkpoint you can test if a CheckBox is checked, a radio button is enabled or you can check value of an edit box.
  2. Image Checkpoint: This check for the values of an image i.e. source of the image.Image checkpoint is supported in web environment only. You can create an Image Checkpoint by applying Standard Checkpoint on Image.
  3. Bitmap Checkpoint: Test area of an image as a bit map. This checkpoint is used to check if the image is right. You can use this checkpoint anywhere in you application for Button, Text Box etc.This checkpoint is supported in all add-in environment.
  4. Table Checkpoint: This checkpoint checks if data within a table is correct. You can create Table Checkpoint by adding standard checkpoint on table object.
  5. Text Checkpoint: Text Checkpoint checks that a string is placed at an appropriate place on application. For example in your application text displays as “Neeraj Kumar Bhatnagar”.you can use Text Checkpoint to check that if Kumar displayed between Neeraj & Bhatnagar
  6. Text Area Checkpoint: Enables you to check if the text string is appearing within a defined area in your application. Text Area Checkpoint is only applicable to windows environment such as Standard Windiw, ActiveX, and Visual Basic.
  7. Page Checkpoint: Checks for the characteristics of a web page, ie. Time Taken to web page, broken link etc.You can create a Page Checkpoint by inserting a standard checkpoint on page object.
  8. Database Checkpoint: Database Checkpoint checks the contents of a database accessed by your application. For example, you can use a database checkpoint to check the contents of a database containing flight information for your Web site.
  9. Accessibility Checkpoint: Accessibility Checkpoint identifies areas of your Web site that may not conform to the World Wide Web Consortium (W3C) Web Content Accessibility Guidelines. For example, guideline 1.1 of the W3C Web Content Accessibility Guidelines requires you to provide a text equivalent for every non-text element. You can add an Alt property check to check whether objects that require the Alt property under this guideline, do in fact have this tag.
  10. XML Checkpoint : checks the data content of XML documents in XML files or XML documents in Web pages and frames.The XML Checkpoint (Web Page/Frame) option is supported for the Web add-in environment. The XML Checkpoint option is supported for all add-in environments
Ref : QTP Help

No comments:

Post a Comment