Saturday, 22 December 2012

Check Points in QTP


Check Points in QTP.

Check point are verification points used to compare actual value with the expected value.

Actaul Value - Value that is present in application.
Expected Value - Value that is supposed to be in the application (While recording).

Its retrives  the value from object (Actual Result) and compare the value between Expected result ( specify the object property value while recording) and Actual result.

In QTP,there are total 8 types of check point.They are as follows:
1.(DCP)Database Check point:It checks the backend data of the application
2.(SCP)Standard check point:It checks the GUI objects properties
3.(TACP)Text area check point:It checks the perticular text area in a application
4.(TCP)Text check point:It checks the text in a application
5.(BCP)Bitmap check point: it checks the bitmaps in an application. It takes perticular area as a bitmap.But Image check point checks only web application
6.(XCPF)XML check point from file: It checks the XML code for the perticular file.
7.(XCP)XML check point:It can checks the XML web application
8.(ACP)Accessibility Check point: It can checks the accessibility of the web application only.


Type of Check points:

1) Standered Checkpoint:

-> Its compare the all prperty value of the object from Actual result with Expected result.

-> we can check the all property value.

-> If not match, Text case in fail.

In Recording Mode -> Place  curser in desired objects -> Insert -> Check Point -> Standered Check point -> Show the object -> Click ok -> select property and enter expected result -> Click ok -> Stop recording.

Browser("MyWebSearch").Page("MyWebSearch").WebEdit("searchfor").Check CheckPoint("searchfor")


2) Text Check point :

-> It Compare the object text property value from actual result with expected result.

-> We can use this type for the object which have the text property value.

-> we are not able use this check point type for the object which dont have the text prperty value.

In Recording Mode -> Place  curser in desired objects -> Insert -> Check Point -> Text check point -> Show the object -> Click ok -> select options (Match case,ignore Case, Exact case,text not diplayed)

Browser("MyWebSearch").Page("MyWebSearch").Check CheckPoint("MyWebSearch")

Note : When checking text, QuickTest tries to retrieve the text directly from the object. If QuickTest cannot retrieve the text in this manner (for example, because the text is part of a picture), it tries to retrieve the text using an OCR (optical character recognition) mechanism. The OCR mechanism translates images of handwritten or typewritten text into machine-editable text


3)Text Area Checkpoint:

->Check the text string displayed in windwos based application, according to the specified criteria

In Recording Mode -> Place  curser in desired objects (in windows based application) -> Insert -> Check Point -> TextArea check point -> Show the object -> Click ok -> select options (Match case,ignore Case, Exact case,text not diplayed)


4) Bitmap Check point:

-> while using bitmmap check point in recording mode, QTP capture the object and take one photo copy of the object and saved as a image file(Expected Result).

-> Bitmap check point compare the photo copy of the object(Expected result) with object present in application (Actual Result).

-> We can use all type of object for this type of check point( Becase its take bitmap for all object).

In Recording Mode -> Place  curser in desired objects -> Insert -> Check Point -> Bitmap check point -> Show the Bitmap -> Click ok -> Select "Check only Selected area" option if we want to compare part of the bitmap -> Click ok -> Stop recording


5) Database Check point :

-> its verify the content of the back end database.

-> We dont put the tool under the recording mode. Since data i from backend.

Insert -> Check point -> Database check point -> Chossse " Specify SQL statment manually"option -> click next -> click create -> select machine data source -> Select DSN(QT_FLIGHT32) -> Click ok -> enter SQL statement (Select * from orders) -> finishb -> click ok

For More information for use any database - > http://qtp.blogspot.in/2007/08/qtp-tutorials-6-database-checkpoint_05.html

6) Accessability checkpoint:

->Its checks that whether our webpage in our application developed according to the W3C rules and regulation or not.

-> This option is disabled always because its configurable checkpoint. So According to our requirements, we can customize.

Configuring in add ins:

Tools -> Options-> Web -> Advanced -> Select Quidelines to be checked according to the requirements.

In QTP:

In Recording Mode  -> Insert -> Check Point -> Accessbility Check point -> Click the page to be checked -> Click ok  -> Click ok -> Stop recording.


7) XML Checkpoint (From Resource)

-> Check the data content in the XML document in XML files.

In Recording Mode  -> Insert -> Check Point -> XML Check point(From Resource) -> Slect the XML file from local machine to check -> Select the check box against element

( we can check number of attributes, atributes values, number of child elements) -> Click ok  -> Click ok -> Stop recording.

8) XML Checkpoint (From Application)

-> Check the data content in the XML document opened in the web browser.

In Recording Mode  -> Insert -> Check Point -> XML Check point(From Application) -> Slect the XML document opened in web browser to check -> Select the check box

against element ( we can check number of attributes, atributes values, number of child elements) -> Click ok  -> Click ok -> Stop recording.


9) Page Check point( Using Standered check point)

-> Its check the number of links, images and loading time in web page.

-> It is a hiden check point, we can isnert this through standered check point.

In Recording Mode -> Place  curser in desired objects -> Insert -> Check Point -> Standered Check point -> Show the object selection - Checkpoint property -> Select

the page item from the displayed object tree  -> Click ok -> select and verify the loading time, number of links and number of images-> click ok-> Stop recording.


10) Image Check point (Using Standared Check point):

-> Its check the imapge property values.

-> It is a hiden check point, we can isnert this through standered check point.

In Recording Mode -> Place  curser in desired objects -> Insert -> Check Point -> Standered Check point -> Show the Image -> Click ok  -> Click ok -> Stop recording.


11) Table Check point(Using Standered Check point):

-> Its check contents of web tables.

-> It is a hiden check point, we can isnert this through standered check point.

In Recording Mode -> Place  curser in desired objects -> Insert -> Check Point -> Standered Check point -> Show the web table -> Click ok  -> Click ok -> Stop recording.


Store Check point return value into variable:

QTP return the value always. Its depends on whether we capture or not.

steps:

Declare the variable and catch the return value into the variable

Dim return
return = Browser("MyWebSearch").Page("MyWebSearch").Check CheckPoint("MyWebSearch")
msgbox(return)

But this is not correct format.

we want to enclose the bracket in check point function like -> Check (CheckPoint("MyWebSearch"))

So final statments like

Dim return
return = Browser("MyWebSearch").Page("MyWebSearch").Check ( CheckPoint("MyWebSearch"))
msgbox(return)

Reference Links:

http://qtp.blogspot.in/2007/08/qtp-tutorials-11-checkpoint-return.html
http://www.gcreddy.com/2010/04/inserting-checkpoints.html

No comments:

Post a Comment