Sei sulla pagina 1di 8

A checkpoint enables you to identify whether the Web site or application under test is functioning correctly or

not by comparing a current value for a particular property with the expected value for that property.
By default, the checkpoint name receives the name of the test object on which the checkpoint is being
performed. We can change the name of the checkpoint if needed.
QuickTest Professional offers the following types of checkpoints:
Checkpoint Type: Standard heckpoint
Description: Standard checkpoints allow checking the object property values in the Web site or application
under test. Standard checkpoints evaluate !compare" the expected values of object properties captured during
recording to the object#s current values during a run session.
Example of Use: heck that a radio button is selected.
Standard checkpoints can be used to perform checks on $mages, %ables, Web page properties, and other objects
within your application or Web site.
$t can be inserted in & ways.
%hrough application
%hrough active screen
Standard checkpoints are supported for all add'in environments.
Checkpoint Type: $mage heckpoint
Description: hecks the property values of an image.
Example of Use: heck that the image source file is correct.
$mage checkpoints are supported for the Web environment.
An image checkpoint can also be created by inserting a standard checkpoint on an image object.
Checkpoint Type: %able heckpoint
Description: hecks information in a table.
Example of Use: heck that the value in a table cell is correct. heck that a table has the expected number of
rows and columns.
A table checkpoint can also be created by inserting a standard checkpoint on a table object.
%able checkpoints are supported for Web and Active(.
Checkpoint Type: )age heckpoint
Description: hecks the characteristics of a Web page.
Example of Use: heck how long a Web page takes to load or if a Web page contains broken links.
)age checkpoints are supported for the Web environment.
A page checkpoint can also be created by inserting a standard checkpoint on page object.
Checkpoint Type: %ext heckpoint
Description: hecks that a text string is displayed in the appropriate place in a Web page or application.
Example of Use: heck whether the expected text string is displayed in the expected location in a test object.
$t can be inserted in & ways.
%hrough application
%hrough active screen
%ext checkpoints are supported for all add'in environments.
Checkpoint Type: %ext Area heckpoint
Description: hecks that a text string is displayed within a defined area in a Windows'based application.
Example of Use: heck that an area of a dialog box includes text that was entered in another part of the
application.
$t can be inserted only through application but not through active screen.
%ext area checkpoints are supported for Standard Windows, *isual Basic, and Active( add'in environments.
Checkpoint Type: Bitmap heckpoint
Description: hecks an area of a Web page or application after capturing it as a bitmap. While creating a test,
we have to specify the area to check by selecting an object. An entire object or any area within an object can be
checked.
Example of Use: heck that a Web page !or any portion of it" is displayed as expected.
$t can be inserted in & ways.
%hrough application
%hrough active screen
Bitmap checkpoints are supported for all add'in environments.
Checkpoint Type: +atabase heckpoint
Description: hecks the contents of databases accessed by an application or Web site.
Example of Use: heck that the value in a database ,uery is correct.
+atabase checkpoints are supported for all add'in environments
Checkpoint Type: Accessibility heckpoint
Description: $dentifies areas of a Web site to check for Section -./ compliancy.
Example of Use: heck if the images on a Web page include A0% properties, re,uired by the W1 Web
ontent Accessibility 2uidelines.
Accessibility checkpoints are supported for the Web environment.
Checkpoint Type: (30 heckpoint
Description: hecks the data content of (30 documents in (30 files or (30 documents in Web pages and
frames.
Example of Use: heck the content of an element to make sure that its tags, attributes, and values have not
changed.
4ote5 (30 file checkpoints are used to check a specified (30 file6 (30 application checkpoints are used to
check an (30 document within a Web page.
(30 checkpoints !Web page7frame" are supported for the Web environment6 (30 checkpoints !file" are
supported by all environments
(30 heck )oint ' 8rom Application
(30 heck )oint ' 8rom resource
4ote5 When 9uick%est creates a checkpoint, it assigns a name based on information inside the checkpoint:the
checked value, for example. %he checkpoint name remains unchanged, even if you subse,uently modify the
information on which it was based. ;eep this in mind when looking for checkpoints displayed in the ;eyword
*iew. <owever, note that 9uick%est may shorten the name displayed in the ;eyword *iew.
heckpoints cannot be added manually, they are inserted using 9%)#s interface. =esults of the checkpoint can
be viewed in the %est =esults Window.
heckpoint information is stored in the 0ocal >bject =epository. $t is in the =esource.mtr file which is
in the action folder !if you created checkpoint in action? then it will be action ? folder under the folder in which
you are saving the test7script, if you created checkpoint in action & then it will be action & folder and so on" .
$n the expert view, on any blank line type heckpoint and put @!@. As soon as you put the starting
bracket it will show all the checkpoints you have used in the test.
Example of Standard Check Point
>pen a blank test.
3ake sure that 8light application is open. !4ow only 9%) with blank test and 8light application should
be open".
lick on =ecord. When we click on =ecord, @=ecord and =un Settings@ window opens up. 2o to
@Windows Applications@ tab and choose first option @=ecord and run test on any open Windows based
application.@ and click ok.
2o to $nsert !menu"'Aheckpoint'AStandard heckpoint !or press 8?&".%he mouse pointer will become
hand and 9%) will be minimiBed.
lick on the @8lights...@ button which is on the =ight <and Side of the @8ly %o@ combo box in the 8light
application.
$t will open @>bject Selection ' heckpoint )roperties@ window !with WinButton580$2<% highlighted".
lick ok.
$t will open checkpoint properties window. !only one property will be checked in it i.e. #enabled# with a
value of 8alse."
lick ok. lick on Stop in order to stop the =ecording.
Save the test.
4ow we can run the test in two ways to see how it fails and passes the results of the checkpoint.
To see a pass test result:
3ake sure that this test and 8light application is open. lick on run. $t will =un the test and show you the result
as pass.
To see a ail test result:
3ake sure that this test and 8light application is open. $n the 8light application enters the +ate of 8light, 8ly
8rom and 8ly %o fields and nothing else. !%he reason for doing this is that it will enable the #8light...# button"
lick on run in order to run the test. $t will =un the test and show you the result as 8ail. %his is because 9%)
was looking for a disabled #8light...# button for which it recorded the information at the record time, but now
since the button was enabled at run time, so it failed.
Example of QTP Existing Checkpoint
9uick%est !9%)" now makes it possible for you to reuse an existing checkpoint in your test. 8or example you
can use bitmap checkpoint to verify your company#s logo on each page of your application or website.
0etCs see a very simple example to accomplish this.
?. >pen a new test !3ake sure that 8light =eservation Window in open."
&. lick on =ecord in order to start recording.
1. 2o to $nsert'Aheckpoint'AStandard heckpoint. !9%) will be minimiBed and mouse pointer will take the
shape of a hand."
D. lick on the 8lights... button which is on the right hand side of 8ly %o dropdown.
-. >bject Selection ' heckpoint )roperties window opens, lick >;.
E. heckpoint )roperties window opens, lick >;. !Standard checkpoint will be added"
F. lick Stop in order to stop recording.
/. 2o to =esources'A>bject =epository !>= associated with this particular action will open"
G. 2o to 8ile'A Hxport and =eplace 0ocal >bjects !Hxport >bject =epository dialog opens"
?.. Hnter any filename e.g. rep? and click Save !All the objects in 0ocal >bject =epository will be grayed"
??. lose that >bject =epository.
?&. Save the test as testone.
?1. >pen a new test and Save it with the 4ame testtwo.
Associate Shared >bject =epository =ep? with it also. !$f not already associated"
$n the keyword view, right click on action ? and choose Action )roperties.
2o to Associated =epositories tab.
lick on the IJC sign to locate the shared >bject =epository and associate it.
!$f it asks for Automatic =elative )ath onversion lick Kes"
lick >k to close that Action )roperties window.
?D. 4ow !in testtwo" you can see when you go to $nsert'A heckpoint, Hxisting heckpoint will be enabled to
let you insert any checkpoints already saved to the shared >bject =epository !=ep? in our case".
Example of Page Checkpoint
>pen a blank test.
3ake sure thathttp577www.google.co.in7 is open.!4ow only 9%) with blank test and www.google.co.in
should be open."
lick on =ecord. When we click on =ecord, @=ecord and =un Settings@ window opens up. 2o to @Web@
tab and choose first option @=ecord and run test on any open browser.@ and click ok.
2o to $nsert !menu"'Aheckpoint'AStandard heckpoint !or press 8?&".
%he mouse pointer will become hand and 9%) will be minimiBed.
lick anywhere on the white space on the 2oogle.co.in page.
$t will >pen @>bject Selection ' heckpoint )roperties@ window. lick on #)age 5 2oogle# option which
has a page icon on left of it with right corner of the page slightly folded.
lick ok.
A #)age heckpoint )roperties# window opens up. 0et all the options be default. lick ok.
lick on Stop in order to stop the =ecording.
$n the Hxpert view it will add just one line5
Browser!@2oogle@".)age!@2oogle@".heck heck)oint!@2oogle@"
$ ran this test by opening www.google.co.in in offline mode !not on internet". $t recorded the following
properties5
<ere it shows the load time as . because $ did not open 2oogle at
the time of running the test, it was already open.
Example of Data!ase Checkpoint
8irst of all you have to connect oracle Gi to 9%) G.!before doing any recording"
8or this go to $nsert 'A heckpoint 'A +atabase heckpoint.
A +atabase 9uery WiBard opens. Select # Specify S90 statement manually# from the 9uery definition
area.
lick 4ext.
<ere click on #reate# button which is on the right of @onnection String5@ $t will open #Select +ata
Source# window. lick on #3achine +ata Source# %ab
lick on 4ew Button.
#reate 4ew +ata Source# window opens.
Select #Lser +ata Source# from Select a type of data source. lick 4ext.
$t will show all the data source drives it could find.
Select >racle !on my machine it was #>racle in >ra<omeG#". lick 4ext. lick 8inish.
$t will open #>racle >+B +river onfiguration# window.
Hnter #+ata Source name# ! $ entered @oracle@"
Hnter #description# !$ entered @S90@"
Select #%4S Service 4ame# ! $ selected #+B.&#, my oracle database name" from combo box.
Hnter userid !$ used S>%%".
lick #%est onnection# Button.$t will ask for a )assword. Hnter your password for >racle.
)roperty 4ame )roperty *alue
load time @.@
number of images M&N
number of links M&.N
$f successful it will show #%esting onnection# window with #onnection Successful# written on it.
%his completes our task of onnecting 9%) with >racle.
4ow we will record a test.
>pen a blank test.
lick on =ecord. When we click on =ecord, @=ecord and =un Settings@ window opens up. 2o to
@Windows Applications@ tab and choose first option @=ecord and run test on any open Windows based
application.@ and click on ok.
2o to $nsert !menu"'Aheckpoint'A+atabase heckpoint
A #+atabase 9uery WiBard# opens.
Select # Specify S90 statement manually# from the 9uery definition area. lick 4ext. lick reate.
2o to #3achine +ata Source# %ab
Select >racle from data source name. lick >k. $t will open #>racle >+B +river onnect#
Hnter password. lick ok
$t will come to +atabase 9uery WiBard window with #onnection String# field filled with5
@+S4Ooracle6L$+OS>%%6)W+O%$2H=6+B9O+B.&6+BA
OW6A)AO%6H(O868H4O%69%>O%68=O?.68+0O?.6
0>BO%6=S%O%62+HO868=0O86BA3O$fAllSuccessful63%SO86
3+$O86S=O868WO86)8O?.6%0>O.6@
$n the S90 Statement area type @select P from emp6@. lick 8inish.
$t will open #+atabase heckpoint )roperties# window with the result of the ,uery. lick >k.
lick Stop in order to stop the =ecording.
$n the Hxpert *iew, it just adds one line @+b%able!@+b%able@".heck
Example of "itmap Checkpoint
3ake sure that 9%) and the 8light application are open.
ST#$E %
>pen a blank test.
lick on =ecord. When we click on =ecord, @=ecord and =un Settings@ window opens up. 2o to
@Windows Applications@ tab and choose first option @=ecord and run test on any open windows based
application.@ and click >k.
2o to $nsert !menu"'Aheckpoint'ABitmap heckpoint
lick on the @8ly %o@ combo box.
@>bject Selection' Bitmap heckpoint )roperties@ window opens up. $ will have @WinomboBox58ly
%o@ highlighted. lick ok
$t will open @Bitmap heckpoint )roperties@ window.
hange the @heckpoint timeout@ at the bottom of the window to . seconds, so that we will have no wait
time while running the test.
lick ok.
lick stop to stop recording the test.
S%K0H B
Above, after 1rd point, instead of clicking on the @8ly %o@ combo box, click somewhere in the empty space
above the @8ly 8rom@ ombo box but below the line, i.e. in the @8light Schedule@ area.
@>bject Selection' Bitmap heckpoint )roperties@ window opens up. $t will have @Win>bject58light Schedule@
highlighted. lick ok
$t will open @Bitmap heckpoint )roperties@ winodow. %his time it will have @8light schedule@ area instead of
just the @8ly %o@ combo box.
4ow click on the @Select Area...@ button. 3ouse pointer will change so that you can select any area by dragging.
Qust select @8ly 8rom@ combo box by dragging.
hange the @heckpoint timeout@ at the bottom of the window to . seconds. So that we will have no wait time
while running the test.
lick ok.
lick stop to stop recording the test.
4ow you can run the test it will pass. %o see how it stores the results, just fail the test. $f you have recorded in
the style A then just select any value in the @8ly %o@ combo box and then run the test. $n the result window on
the left hand side when you click on heckpoint @8ly %o5@, it will show you the expected bitmap and actual
bitmap on the right hand side. !note5 it will show that only in case of 8ailed result"
Example of &mage Checkpoint
>pen a blank test.
>n your system under 3y +ocuments, there will be a folder named 3y )ictures, under this you will will find a
folder' Sample )ictures! containing D pictures R Blue <ills, Sunset, Winter, Water lilies"
We will run this test with one of the image there' Sunset.
2o to 3y +ocuments'A3y )ictures'A Sample )ictures and right click on image named #Sunset# and open it with
internet explorer.
4ow only a new blank test and internet explorer with this image should be open.
lick on =ecord. When we click on =ecord, @=ecord and =un Settings@ window opens up. 2o to @Web@ tab and
choose first option @=ecord and run test on any open browser.@ and click on >k.
2o to $nsert !menu"'Aheckpoint'AStandard heckpoint!or press 8?&".%he mouse pointer will become hand
and 9%) will be minimiBed.
lick on the image which is opened in the explorer.
$t will open #>bject Selection heckpoint )roperties# window with $mage5 Sunset highlighted. lick >k.
$t will >pen #$mage heckpoint )roperties# Window. $n this window just uncheck all the property values like
href, html tag etc and only check last property which is src.
=est every thing will be default. lick >;.
lick stop to stop recording the test.
$n the expert view it will just add one line Browser!@file577757+ocumentsS&.andS
&.S@".)age!@file577757+ocumentsS&.andS&.S@".$mage!@Sunset@".heck heck)oint!@Sunset@"
$f you run it with that image open in internet explorer it will pass. %his test is not intelligent enough. $t is just
checking that the image in the explorer is in the same location in which it was when the test was recorded and
its name is Sunset. $f you change the name of some other picture in that folder to Sunset and run the test with
that it will also pass. $n this way you can test for some or all the properties of the image which it showed in the
#$mage heckpoint )roperties# Window.
Example of Text Checkpoint
>pen a blank test and a web page in offline mode like this below5
lick on =ecord. When we click on =ecord, @=ecord and =un Settings@ window opens up. 2o to @Web@
tab and choose first option @=ecord and run test on any open browser.@ and click on ok.
2o to $nsert !menu"'Aheckpoint'A%ext heckpoint.%he mouse pointer will become hand and 9%) will
be minimiBed.lick on the first paragraph !which starts with'%he page you are looking.." of that web
page.
@%ext heckpoint )roperties@ window opens up. $t will show the text to be checked in @heckpoint
Summary@ area in red color and also show in blue color the text which is displayed before and after the
selected text.
lick on onfigure 'here you can change your selected text, change before and after text and so on, but
for now just click ok. At the bottom of the @%ext heckpoint )roperties@ window change #heckpoint
timeout# to . seconds. Again lick ok to come out of @%ext heckpoint )roperties@ window.
lick on stop in order to stop recording.
=un the test and when it is passed just go to the results window and on the left hand side just expand every
option and click on last option heckpoint @annot find server@. >n the right hand side it will show you the
details.
Example of Ta!le Checkpoint
>pen a blank test and also open a website @http577www.editorial.co.in7software7software'testing'life'
cycle.php@ in offline mode.
%his website has a table at the bottom of the page.
lick on =ecord. When we click on =ecord, @=ecord and =un Settings@ window opens up. 2o to @Web@
tab and choose first option @=ecord and run test on any open browser.@ and click on ok.
2o to $nsert !menu"'Aheckpoint'AStandard heckpoint !or press 8?&".
%he mouse pointer will become hand and 9%) will be minimiBed.
lick somewhere inside the table.
@>bject Selection ' heckpoint properties@ window opens.
Select @Web%able5 Software %esting 0ife ycle@ which has a table icon on its left, where @Software
%esting 0ife ycle@ is the name of the table.
lick ok.
#%able heckpoint properties# window opens. $t will show all the rows and columns of the selected table.
%his time we will not do any extra setting. Qust change the heckpoint timeout at the bottom of this
window to . seconds and click ok.
lick stop in order to stop recording.
=un the test and analyBe the results in the result window, mainly the checkpoint results to see how 9%)
verifies the result. We will manipulate test results in later tutorials.
Example of Checkpoint 'eturn (alue
We will use the Standard heckpoint which we did in tutorial D.
>pen that test that contains the standard heckpoint.
$n the expert view of the test you will see only one line i.e.
Window!@8light =eservation@".WinButton!@80$2<%@".heck heck)oint!@80$2<%@"
4ow we will make some changes in this one line so that it can return some value.
4>%H5 heckpoint always returns a value, it depends on us whether we capture it or not.
0ets now capture it.
+eclare a variable and catch the return value in that variable5
+im return
return O Window!@8light =eservation@".WinButton!@80$2<%@".heck heck)oint!@80$2<%@"
msgbox !return"
>ne thing more we need to do here is that we have to enclose heckpoint !@80$2<%@" in brackets. So the final
version looks like this5
+im return
return O Window!@8light =eservation@".WinButton!@80$2<%@".heck !heck)oint!@80$2<%@""
msgbox !return"
4ow run the test and see the msgbox appearing with the return value.
Difference !etween Text ) Text %rea Checkpoint
Text Checkpoint Text %rea Checkpoint
%ext heckpoint checks that a text string is
displayed in the appropriate place on a Web page or
application.
%ext Area heckpoint checks that a text string is
displayed within a defined area in a Windows'based
application, according to specified criteria.
Kou can add a text checkpoint while recording or
editing steps in a Windows' or Web'based
application.
Kou can add a text area checkpoint only while recording
a test on Windows'based applications, such as Standard
Windows, Qava, *isual Basic, and Active(.

Potrebbero piacerti anche