Friday 6 April 2012

Checkpoint and its Type


It is a specialized step that compares two values and and are given in the result .  A checkpoint used as Verification and compares the actual Results from the   expected results in a test plan.If two values in a checkpoint gets matched then the checkpoint passes or else it will get fail .This enables you to identify whether your Web site or application is functioning correctly. When we add a checkpoint, the test  adds a checkpoint to the current row in the Keyword View and adds a  CheckPoint statement in the Expert View. When we run the test , then it compares the expected results and the actual results.  You can view the results of the checkpoint in the Test Results window. These are similar to the  conditional statements(like If, if else,for, while etc).You can add checkpoints during a recording session or while editing your test or component . Checkpoints are stored in Local Object Repository.       

                  

When we Click on Record Button then all the checkpoints in Insert tab will get enabled.

Types Of Checkpoints
---------------------------------
1.Standard checkpoint

2.Text CheckPoint

3.Text Area CheckPoint

4.Bitmap CheckPoint

5.Database CheckPoint

6.Accessibility CheckPoint

7.XML CheckPoint (From Resource)

8.XML CheckPoint (From Application)

Standard Checkpoint :
--------------------------------


 It  checks the property  of the object in the web application .It checks a variety of objects such as buttons, radio buttons, webedits,WinButtons, lists.... etc.It compares the expected values of the object to the actual value during recording and run time .

Ex:  Browser("BrowserName").Page("PageName").Link("LinkName").Check CheckPoint("Comments")

 
Text Checkpoint :
------------------------       

In the Text Checkpoint we can define which text to be checked and as well as which is displayed before and after the checked text. This Verifies whether the text string is placed in appropriate place in the Web or Windows application .


There is a button called Configure in Text checkpoint Properties ,where we can edit the Text with  : Checked Text ,Text Before,Text After .It Displays the Checked text in Red and the Text Before and Text After in Blue.Edit the text and click Ok . It will be recorded and in the Expert View it will be displayed .It can be used for Windows or Web Application
Ex:Browser("BrowserName").Page("PageName").Check CheckPoint("The Text we are going to check")
Text Area Checkpoint :
----------------------------------
It is also simillar to Text Checkpoint . It verifies that the Text string is placed in Appropriate place in Windows Application. Here we can drag how much area in the Text to be taken in Windows Application .In order to devide or separate the captured Text, we need to use Configure button ( Checked Text ,Text Before,Text Before ).It is Applicable only for Desktop Application . Make sure to change the record and run settings to Windows Application.
Ex :Window("Desktop ApplicationName").CheckCheckPoint("The text what we are  going to check")

Bitmap Checkpoint :
-----------------------------

It is nothing but  checking  an area of a Web page or application as a bitmap. When we create a test ,then we need to specify the area that to be  checked. Here QTP captures tghe specified object as bitmap and inserts the checkpoint .Here it compares the selected areas of the object displayed in the application when recorded.After we select the bitmap, the image can be viewed in Bitmap checkpoint properties. 



In the Bitmap properties we have two options as Check entire bitmap and check only selected area. In Check entire bitmap the whole image  will be displayed where as in check only selected area can be edited there itself .



Specify the checkpoint timeout and click OK then a statement will displayed in expert view.
Ex:Window("Desktop ApplicationName").WinObject("Internet Explorer_Server").        Check CheckPoint("Internet Explorer_Server")
Database Checkpoint :
----------------------------------

It is used to test the contents of the database accessed by application under test. It stores the expected data and compares this with the data stored in the database. When we  use this checkpoint  in test, it connects  and sends the query to the database to retrieve the  data while recording. It compares the current dat with expected data and give the result as pass or fail.

When we go for database checkpoint then we need to go through Database query wizard.We have two query defination . For this we need to create Query for Create query using Microsoft Query or Specify SQL statement manually .
 Accessibility Checkpoint :
------------------------------------

It is the one which identifies areas of your Web site that may not conform to the World Wide Web Consortium (W3C) Content Accessibility Guidelines. We can add a checkpoints either while recording or editing the test.This is designed to find out the common areas in web site.It is supported for web add-in environment .
It is used to check for Activex check,Alt property check,Applet check,Frame Titles chek,Multimedia check,server-side check,Tables check.
 XML Checkpoint :
----------------------------

It is nothing but XML (Extensible Markup Language) This is the one which is used to check the data of XML documents in XML files or in web pages and frames .We can create XML file checkpoints in order to directly access and verifyspecified XML files in the system. It can be created  while  recording or editing your test or component.




In QTP, For  XML checkpoint(From Application) it cannot be used without using Record button.But wheras for XML CheckPoint(From Resource) Record is not used for checkpoint.  
Ex:1) XMLFile("Xml file").Check CheckPoint("Name of the file")
2)Browser("BrowserName").Page("PageName").WebXML("http:/www.abc.comXML/s").Check CheckPoint("http://www.abc.com/XML/simple.xml")