printed qtp qa

17
1. What are the Features & Benefits of Quick Test Pro (QTP 8.0)?  - Operates stand-alone, or integrated into Mercury Business Process Testing and Mercury Quality Center. Introduces next- generation zero-configuration ey!ord "ri#en testing tec$nology in Quic% Test Professional &.' allo!ing for fast test creation, easier (aintenance, and (ore po!erful data-dri#ing capa)ility. Identifies o)*ects !it$ +niue (art O)*ect ecognition, e#en if t$ey c$ange fro( )uild to )uild, ena)ling relia)le unattended script execution. Collapses test docu(entation and test creation to a single step !it$ /uto-docu(entation tec$nology. 0na)les t$oroug$ #alidation of applications t$roug$ a full co(ple(ent of c$ec%points. . How to handle the ece!tions usin" reco#er$ scenario %ana"er in QTP?  - T$ere are 2 trigger e#ents during !$ic$ a reco#ery scenario s$ould )e acti#ated. / pop up !indo! appears in an opened application during t$e test run3 / property of an o)*ect c$a nges its state or #alue, / step in t$e test does not run successfully, /n ope n application fails during t$e test run, T$ese triggers are considered as exceptions.4ou can instruct QTP to reco#er unexpected e#ents or errors t$at occurred in your testing en#iron(ent during test run. eco#ery scenario (anager pro#ides a !izard t$at guides you t$roug$ t$e defining reco#ery scenario. eco#ery scenario $as t$ree steps3 1. Triggered 0#ents . eco#ery steps 5. Post eco#ery Test-un 5. What is the use of Tet out!ut #alue in QTP?  - Output #alues ena)le to #ie! t$e #alues t$at t$e application tal%s during run ti(e. 6$en para(eterized, t$e #alues c$ange for eac$ iteration. T$us  )y creating output #alues, !e can capture t$e #alues t$at t$e application ta%es for eac$ run and output t$e( to t$e data ta)le. 2. How to use the 'ect s!$ in QTP 8.0 #ersion?  - T$ere are t!o !ays to py t$e o)*ects in QTP3 17 T$ru file tool)ar, In t$e 8ile Too l)ar clic% on t$e last tool)ar )utton 9an icon s$o!ing a person !it$ $at7. 7 True O)*ect repository "ialog, In O)*ect repository dialog clic% on t$e )utton o)*ect spy. In t$e O)*ect spy "ialog clic% on t$e )utton s$o!ing $and sy()ol. T$e pointer no! c$anges in to a $and sy()ol and !e $a#e to point out t$e o)*ect to spy t$e state of t$e o)*ect if at all t$e o)*ect is not #isi)le. or !indo! is (ini(ized t$en, $old t$e Ctrl )utton and acti#ate t$e reuired !indo! to and release t$e Ctrl )utton. :. How oes *un ti%e data (Para%eteri+ation) is handled in QTP?  - 4ou can t$en enter test data into t$e "ata Ta)le, an integrated spreads$eet !it$ t$e full functionality of 0xcel, to (anipulate data sets and create (ultiple test iterations, !it$out progra((ing, to expan d test case co#erage. "ata can )e typed in or i(ported fro( data)ases, spreads$eets, or text files. ;. What is ke$word #iew and ,!ert #iew in QTP?  - Quic% Test<s ey!ord "ri#en approac$, test auto(ation experts $a#e full access to t$e underlying test and o)*ect properties, #ia an integrated scripting and de)ugging en#iron(ent t$at is round-trip sync$ronized !it$ t$e ey!ord =ie!. /d#anced testers can #ie! and edit t$eir tests in t$e 0xpert =ie!, !$ic$ re#eals t$e underlying industry-standard =Bcript t$at Quic% Test Professional auto(atically generates. /ny c$anges (ade in t$e 0xpert =ie! are auto(atically sync$ronized !it$ t$e ey!ord =ie!. >. ,!lain a'out the Test Fusion *e!ort of QTP?  - Once a tester $as run a test, a Test 8usion report displays all aspects of t$e test run3 a $ig$-le#el results o#er#ie!, an expanda)le Tree =ie! of t$e test specifying exactly !$ere application failures occurred, t$e test data used, application screen s$ots for e#ery step t$at $ig$lig$t any discrepancies, and detailed explanations of eac$ c$ec%point pass and failure. By co()ining Test 8usion reports !it$ Quic% Test Professional, you can s$are reports across an entire Q/ and de#elop(ent tea(. &. Which en#iron%ents does QTP su!!ort?  - Quic% Test Professional supports functional testing of all enterprise en#iron(ents, including 6indo!s, 6e),..?0T, @a#aA@00, /P, ie)el, Oracle, Peopleoft, =isual Basic, /cti#e, (ainfra(e ter(inal e(ulators, and 6e) ser#ices. . What is QTP? - Quic% Test is a grap$ical interface record-play)ac% auto(ation tool. It is a)le to !or% !it$ any !e), *a#a or !indo!s client application. Quic% Test ena)les you to test standard !e) o)*ects and /cti#e controls. In ad dition to t$ese en#iron(ents, Quic% Test Professional also ena)les you to test @a#a ap plets and applications and (ulti(edia o)*ects on /pplications as !ell as standard 6indo!s applications, =isual Basic ; applications and.?0T fra(e!or% applications 1'. ,!lain QTP Testin" !rocess?  - Quic% Test testing process consists of ; (ain p$ases3

Upload: atulsinghchouhan

Post on 03-Jun-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Printed QTP QA

8/12/2019 Printed QTP QA

http://slidepdf.com/reader/full/printed-qtp-qa 1/17

1. What are the Features & Benefits of Quick Test Pro (QTP 8.0)? - Operates stand-alone, or

integrated into Mercury Business Process Testing and Mercury Quality Center. Introduces next-generation zero-configuration ey!ord "ri#en testing tec$nology in Quic% Test Professional &.'

allo!ing for fast test creation, easier (aintenance, and (ore po!erful data-dri#ing capa)ility.

Identifies o)*ects !it$ +niue (art O)*ect ecognition, e#en if t$ey c$ange fro( )uild to )uild,ena)ling relia)le unattended script execution. Collapses test docu(entation and test creation to a

single step !it$ /uto-docu(entation tec$nology. 0na)les t$oroug$ #alidation of applications

t$roug$ a full co(ple(ent of c$ec%points.

. How to handle the ece!tions usin" reco#er$ scenario %ana"er in QTP? - T$ere are 2 triggere#ents during !$ic$ a reco#ery scenario s$ould )e acti#ated. / pop up !indo! appears in an

opened application during t$e test run3 / property of an o)*ect c$anges its state or #alue, / step in

t$e test does not run successfully, /n open application fails during t$e test run, T$ese triggers areconsidered as exceptions.4ou can instruct QTP to reco#er unexpected e#ents or errors t$at

occurred in your testing en#iron(ent during test run. eco#ery scenario (anager pro#ides a

!izard t$at guides you t$roug$ t$e defining reco#ery scenario. eco#ery scenario $as t$ree steps31. Triggered 0#ents . eco#ery steps 5. Post eco#ery Test-un

5. What is the use of Tet out!ut #alue in QTP? - Output #alues ena)le to #ie! t$e #alues t$at t$e

application tal%s during run ti(e. 6$en para(eterized, t$e #alues c$ange for eac$ iteration. T$us )y creating output #alues, !e can capture t$e #alues t$at t$e application ta%es for eac$ run and

output t$e( to t$e data ta)le.2. How to use the 'ect s!$ in QTP 8.0 #ersion? - T$ere are t!o !ays to py t$e o)*ects in QTP3

17 T$ru file tool)ar, In t$e 8ile Tool)ar clic% on t$e last tool)ar )utton 9an icon s$o!ing a person!it$ $at7. 7 True O)*ect repository "ialog, In O)*ect repository dialog clic% on t$e )utton o)*ect

spy. In t$e O)*ect spy "ialog clic% on t$e )utton s$o!ing $and sy()ol. T$e pointer no! c$anges

in to a $and sy()ol and !e $a#e to point out t$e o)*ect to spy t$e state of t$e o)*ect if at all t$eo)*ect is not #isi)le. or !indo! is (ini(ized t$en, $old t$e Ctrl )utton and acti#ate t$e reuired

!indo! to and release t$e Ctrl )utton.

:. How oes *un ti%e data (Para%eteri+ation) is handled in QTP? - 4ou can t$en enter test datainto t$e "ata Ta)le, an integrated spreads$eet !it$ t$e full functionality of 0xcel, to (anipulate

data sets and create (ultiple test iterations, !it$out progra((ing, to expand test case co#erage.

"ata can )e typed in or i(ported fro( data)ases, spreads$eets, or text files.;. What is ke$word #iew and ,!ert #iew in QTP?  - Quic% Test<s ey!ord "ri#en approac$, test

auto(ation experts $a#e full access to t$e underlying test and o)*ect properties, #ia an integrated

scripting and de)ugging en#iron(ent t$at is round-trip sync$ronized !it$ t$e ey!ord =ie!.

/d#anced testers can #ie! and edit t$eir tests in t$e 0xpert =ie!, !$ic$ re#eals t$e underlyingindustry-standard =Bcript t$at Quic% Test Professional auto(atically generates. /ny c$anges

(ade in t$e 0xpert =ie! are auto(atically sync$ronized !it$ t$e ey!ord =ie!.

>. ,!lain a'out the Test Fusion *e!ort of QTP? - Once a tester $as run a test, a Test 8usionreport displays all aspects of t$e test run3 a $ig$-le#el results o#er#ie!, an expanda)le Tree =ie!

of t$e test specifying exactly !$ere application failures occurred, t$e test data used, application

screen s$ots for e#ery step t$at $ig$lig$t any discrepancies, and detailed explanations of eac$

c$ec%point pass and failure. By co()ining Test 8usion reports !it$ Quic% Test Professional, youcan s$are reports across an entire Q/ and de#elop(ent tea(.

&. Which en#iron%ents does QTP su!!ort? - Quic% Test Professional supports functional testing

of all enterprise en#iron(ents, including 6indo!s, 6e),..?0T, @a#aA@00, /P, ie)el, Oracle,Peopleoft, =isual Basic, /cti#e, (ainfra(e ter(inal e(ulators, and 6e) ser#ices.

. What is QTP? - Quic% Test is a grap$ical interface record-play)ac% auto(ation tool. It is a)le to

!or% !it$ any !e), *a#a or !indo!s client application. Quic% Test ena)les you to test standard!e) o)*ects and /cti#e controls. In addition to t$ese en#iron(ents, Quic% Test Professional also

ena)les you to test @a#a applets and applications and (ulti(edia o)*ects on /pplications as !ell as

standard 6indo!s applications, =isual Basic ; applications and.?0T fra(e!or% applications1'. ,!lain QTP Testin" !rocess? - Quic% Test testing process consists of ; (ain p$ases3

Page 2: Printed QTP QA

8/12/2019 Printed QTP QA

http://slidepdf.com/reader/full/printed-qtp-qa 2/17

11. -reate $our test !lan - Prior to auto(ating t$ere s$ould )e a detailed description of t$e test

including t$e exact steps to follo!, data to )e input, and all ite(s to )e #erified )y t$e test. T$e#erification infor(ation s$ould include )ot$ data #alidations and existence or state #erifications of

o)*ects in t$e application.

1. *ecordin" a session on $our a!!lication - /s you na#igate t$roug$ your application, Quic% Testgrap$ically displays eac$ step you perfor( in t$e for( of a collapsi)le icon-)ased test tree. / step

is any user action t$at causes or (a%es a c$ange in your site, suc$ as clic%ing a lin% or i(age, or

entering data in a for(.

15. ,nhancin" $our test - Inserting c$ec%points into your test lets you searc$ for a specific #alue of a page, o)*ect or text string, !$ic$ $elps you identify !$et$er or not your application is functioning

correctly. ?OT03 C$ec%points can )e added to a test as you record it or after t$e fact #ia t$e

/cti#e creen. It is (uc$ easier and faster to add t$e c$ec%points during t$e recording process.Broadening t$e scope of your test )y replacing fixed #alues !it$ para(eters lets you c$ec% $o!

your application perfor(s t$e sa(e operations !it$ (ultiple sets of data. /dding logic and

conditional state(ents to your test ena)les you to add sop$isticated c$ec%s to your test.12. e'u""in" $our test - If c$anges !ere (ade to t$e script, you need to de)ug it to c$ec% t$at it

operates s(oot$ly and !it$out interruption.

1:. *unnin" $our test on a new #ersion of $our a!!lication - 4ou run a test to c$ec% t$e )e$a#iorof your application. 6$ile running, Quic% Test connects to your application and perfor(s eac$

step in your test.1;. nal$+in" the test results - 4ou exa(ine t$e test results to pinpoint defects in your application.

1>. *e!ortin" defects - /s you encounter failures in t$e application !$en analyzing test results, you!ill create defect reports in "efect eporting Tool.

1&. ,!lain the QTP Tool interface. - It contains t$e follo!ing %ey ele(ents3 Title )ar, displaying

t$e na(e of t$e currently open test, Menu )ar, displaying (enus of Quic% Test co((ands, 8iletool)ar, containing )uttons to assist you in (anaging tests, Test tool)ar, containing )uttons used

!$ile creating and (aintaining tests, "e)ug tool)ar, containing )uttons used !$ile de)ugging

tests. ?ote3 T$e "e)ug tool)ar is not displayed !$en you open Quic% Test for t$e first ti(e. 4oucan display t$e "e)ug tool)ar )y c$oosing =ie! D Tool)ars D "e)ug. /ction tool)ar,

containing )uttons and a list of actions, ena)ling you to #ie! t$e details of an indi#idual action or

t$e entire test flo!. ?ote3 T$e /ction tool)ar is not displayed !$en you open Quic% Test for t$efirst ti(e. 4ou can display t$e /ction tool)ar )y c$oosing =ie! D Tool)ars D /ction. If you

insert a reusa)le or external action in a test, t$e /ction tool)ar is displayed auto(atically. Test

 pane, containing t!o ta)s to #ie! your test-t$e Tree =ie! and t$e 0xpert =ie! ,Test "etails pane,

containing t$e /cti#e creen. "ata Ta)le, containing t!o ta)s, Elo)al and /ction, to assist you in para(eterizing your test. "e)ug =ie!er pane, containing t$ree ta)s to assist you in de)ugging

your test-6atc$ 0xpressions, =aria)les, and Co((and. 9T$e "e)ug =ie!er pane can )e opened

only !$en a test run pauses at a )rea%point.7 tatus )ar, displaying t$e status of t$e test1. How does QTP reco"ni+e 'ects in /T? - Quic% Test stores t$e definitions for application

o)*ects in a file called t$e O)*ect epository. /s you record your test, Quic% Test !ill add an entry

for eac$ ite( you interact !it$. 0ac$ O)*ect epository entry !ill )e identified )y a logical na(e

9deter(ined auto(atically )y Quic% Test7, and !ill contain a set of properties 9type, na(e, etc7t$at uniuely identify eac$ o)*ect. 0ac$ line in t$e Quic% Test script !ill contain a reference to t$e

o)*ect t$at you interacted !it$, a call to t$e appropriate (et$od 9set, clic%, c$ec%7 and any

 para(eters for t$at (et$od 9suc$ as t$e #alue for a call to t$e set (et$od7. T$e references too)*ects in t$e script !ill all )e identified )y t$e logical na(e, rat$er t$an any p$ysical, descripti#e

 properties.

'. What are the t$!es of 'ect *e!ositories in QTP? - Quic% Test $as t!o types of o)*ectrepositories for storing o)*ect infor(ation3 s$ared o)*ect repositories and action o)*ect

repositories. 4ou can c$oose !$ic$ type of o)*ect repository you !ant to use as t$e default type

for ne! tests, and you can c$ange t$e default as necessary for eac$ ne! test. T$e o)*ect repository per-action (ode is t$e default setting. In t$is (ode, Quic% Test auto(atically creates an o)*ect

Page 3: Printed QTP QA

8/12/2019 Printed QTP QA

http://slidepdf.com/reader/full/printed-qtp-qa 3/17

repository file for eac$ action in your test so t$at you can create and run tests !it$out creating,

c$oosing, or (odifying o)*ect repository files. Fo!e#er, if you do (odify #alues in an actiono)*ect repository, your c$anges do not $a#e any effect on ot$er actions. T$erefore, if t$e sa(e test

o)*ect exists in (ore t$an one action and you (odify an o)*ect<s property #alues in one action, you

(ay need to (a%e t$e sa(e c$ange in e#ery action 9and any test7 containing t$e o)*ect.1. ,!lain the check !oints in QTP? - / c$ec%point #erifies t$at expected infor(ation is displayed

in an /pplication !$ile t$e test is running. 4ou can add eig$t types of c$ec%points to your test for

standard !e) o)*ects using QTP. / page c$ec%point c$ec%s t$e c$aracteristics of an /pplication.

/ text c$ec%point c$ec%s t$at a text string is displayed in t$e appropriate place on an /pplication./n o)*ect c$ec%point 9tandard7 c$ec%s t$e #alues of an o)*ect on an /pplication. /n i(age

c$ec%point c$ec%s t$e #alues of an i(age on an /pplication. / ta)le c$ec%point c$ec%s

infor(ation !it$in a ta)le on a /pplication. /n /ccessi)ilityy c$ec%point c$ec%s t$e !e) page forection :'& co(pliance. /n MG c$ec%point c$ec%s t$e contents of indi#idual MG data files or

MG docu(ents t$at are part of your 6e) application. / data)ase c$ec%point c$ec%s t$e contents

of data)ases accessed )y your !e) site. n how %an$ wa$s we can add check !oints to an a!!lication usin" QTP?  - 6e can add

c$ec%points !$ile recording t$e application or !e can add after recording is co(pleted using

/cti#e screen 9?ote 3 To perfor( t$e second one T$e /cti#e screen (ust )e ena)led !$ilerecording7.

5. How does QTP identif$ o'ects in the a!!lication? - QTP identifies t$e o)*ect in t$e application )y Gogical ?a(e and Class.

2. What is Para%eteri+in" Tests? - 6$en you test your application, you (ay !ant to c$ec% $o! it perfor(s t$e sa(e operations !it$ (ultiple sets of data. 8or exa(ple, suppose you !ant to c$ec%

$o! your application responds to ten separate sets of data. 4ou could record ten separate tests,

eac$ !it$ its o!n set of data. /lternati#ely, you can create a para(eterized test t$at runs ten ti(es3eac$ ti(e t$e test runs, it uses a different set of data.

:. What is test o'ect %odel in QTP? - T$e test o)*ect (odel is a large set of o)*ect types or classes

t$at Quic% Test uses to represent t$e o)*ects in your application. 0ac$ test o)*ect class $as a list of properties t$at can uniuely identify o)*ects of t$at class and a set of rele#ant (et$ods t$at Quic%

Test can record for it. / test o)*ect is an o)*ect t$at Quic% Test creates in t$e test or co(ponent to

represent t$e actual o)*ect in your application. Quic% Test stores infor(ation a)out t$e o)*ect t$at!ill $elp it identify and c$ec% t$e o)*ect during t$e run session.

;. What is 'ect 1!$ in QTP? - +sing t$e O)*ect py, you can #ie! t$e properties of any o)*ect in

an open application. 4ou use t$e O)*ect py pointer to point to an o)*ect. T$e O)*ect py displays

t$e selected o)*ect<s $ierarc$y tree and its properties and #alues in t$e Properties ta) of t$e O)*ectpy dialog )ox.

>. What is the iff 'etween %a"e check2!oint and Bit %a! -heck !oint? - I(age c$ec%points

ena)le you to c$ec% t$e properties of a 6e) i(age. 4ou can c$ec% an area of a 6e) page orapplication as a )it(ap. 6$ile creating a test or co(ponent, you specify t$e area you !ant to

c$ec% )y selecting an o)*ect. 4ou can c$ec% an entire o)*ect or any area !it$in an o)*ect. Quic%

Test captures t$e specified o)*ect as a )it(ap, and inserts a c$ec%point in t$e test or co(ponent.

4ou can also c$oose to sa#e only t$e selected area of t$e o)*ect !it$ your test or co(ponent inorder to sa#e dis% pace. 8or exa(ple, suppose you $a#e a 6e) site t$at can display a (ap of a

city t$e user specifies. T$e (ap $as control %eys for zoo(ing. 4ou can record t$e ne! (ap t$at is

displayed after one clic% on t$e control %ey t$at zoo(s in t$e (ap. +sing t$e )it(ap c$ec%point,you can c$ec% t$at t$e (ap zoo(s in correctly. 4ou can create )it(ap c$ec%points for all

supported testing en#iron(ents 9as long as t$e appropriate add-ins are loaded7. ?ote3 T$e results of

 )it(ap c$ec%points (ay )e affected )y factors suc$ as operating syste(, screen resolution, andcolor settings.

&. How %an$ wa$s we can !ara%eteri+e data in QTP?  - T$ere are four types of para(eters3 Test,

action or co(ponent para(eters ena)le you to use #alues passed fro( your test or co(ponent, or#alues fro( ot$er actions in your test. "ata Ta)le para(eters ena)le you to create a data-dri#en

Page 4: Printed QTP QA

8/12/2019 Printed QTP QA

http://slidepdf.com/reader/full/printed-qtp-qa 4/17

test 9or action7 t$at runs se#eral ti(es using t$e data you supply. In eac$ repetition, or iteration,

Quic% Test uses a different #alue fro( t$e "ata Ta)le. 0n#iron(ent #aria)le para(eters ena)leyou to use #aria)le #alues fro( ot$er sources during t$e run session. T$ese (ay )e #alues you

supply, or #alues t$at Quic% Test generates for you )ased on conditions and options you c$oose.

ando( nu()er para(eters ena)le you to insert rando( nu()ers as #alues in your test orco(ponent. 8or exa(ple, to c$ec% $o! your application $andles s(all and large tic%et orders, you

can $a#e Quic% Test generate a rando( nu()er and insert it in a nu()er of tic%ets edit field.

. How do u do 'atch testin" in W* & is it !ossi'le to do in QTP3 if so e!lain?  - Batc$ Testing

in 6 is not$ing )ut running t$e !$ole test set )y selecting un Test set fro( t$e 0xecution Erid.T$e sa(e is possi)le !it$ QTP also. If our test cases are auto(ated t$en )y selecting un Test set

all t$e test scripts can )e executed. In t$is process t$e cripts get executed one )y one )y %eeping

all t$e re(aining scripts in 6aiting (ode.5'. f "i#e so%e thousand tests to eecute in 4 da$s what do u do?  - /d$oc testing is done. It

Co#ers t$e least )asic functionalities to #erify t$at t$e syste( is !or%ing fine.

51. What does it %ean when a check !oint is in red color? what do u do?  - / red color indicatesfailure. Fere !e analyze t$e cause for failure !$et$er it is a cript Issue or 0n#iron(ent Issue or a

/pplication issue.

5. What is 'ect 1!$ in QTP? - +sing t$e O)*ect py, you can #ie! t$e properties of any o)*ect inan open application. 4ou use t$e O)*ect py pointer to point to an o)*ect. T$e O)*ect py displays

t$e selected o)*ect<s $ierarc$y tree and its properties and #alues in t$e Properties ta) of t$e O)*ectpy dialog )ox.

55. What is the file etension of the code file & o'ect re!ositor$ file in QTP? - Code fileextension is.#)s and o)*ect repository is.tsr

52. ,!lain the conce!t of o'ect re!ositor$ & how QTP reco"ni+es o'ects? - O)*ect epository3

displays a tree of all o)*ects in t$e current co(ponent or in t$e current action or entire test9depending on t$e o)*ect repository (ode you selected7. 6e can #ie! or (odify t$e test o)*ect

description of any test o)*ect in t$e repository or to add ne! o)*ects to t$e repository. Quic%test

learns t$e default property #alues and deter(ines in !$ic$ test o)*ect class it fits. If it is notenoug$ it adds assisti#e properties, one )y one to t$e description until it $as co(piled t$e uniue

description. If no assisti#e properties are a#aila)le, t$en it adds a special Ordinal identifier suc$ as

o)*ects location on t$e page or in t$e source code.5:. What are the !ro!erties $ou would use for identif$in" a 'rowser & !a"e when usin"

descri!ti#e !ro"ra%%in"? - ?a(e !ould )e anot$er property apart fro( title t$at !e can use.

5;. 5i#e %e an ea%!le where $ou ha#e used a -6 interface in $our QTP !roect?  - co(

interface appears in t$e scenario of front end and )ac% end. for eg3if you r using oracle as )ac% endand front end as =B or any language t$en for )etter co(pati)ility !e !ill go for an interface. of

!$ic$ COM !ill )e one a(ong t$ose interfaces. Create o)*ect creates $andle to t$e instance of t$e

specified o)*ect so t$at !e progra( can use t$e (et$ods on t$e specified o)*ect. It is used fori(ple(enting /uto(ation9as defined )y Microsoft7.

5>. ,!lain in 'rief a'out the QTP uto%ation 'ect 6odel. - 0ssentially all configuration and

run functionality pro#ided #ia t$e Quic% Test interface is in so(e !ay represented in t$e Quic%

Test auto(ation o)*ect (odel #ia o)*ects, (et$ods, and properties. /lt$oug$ a one-on-oneco(parison cannot al!ays )e (ade, (ost dialog )oxes in Quic% Test $a#e a corresponding

auto(ation o)*ect, (ost options in dialog )oxes can )e set andAor retrie#ed using t$e

corresponding o)*ect property, and (ost (enu co((ands and ot$er operations $a#ecorresponding auto(ation (et$ods. 4ou can use t$e o)*ects, (et$ods, and properties exposed )y

t$e Quic% Test auto(ation o)*ect (odel, along !it$ standard progra((ing ele(ents suc$ as loops

and conditional state(ents to design your progra(.

Page 5: Printed QTP QA

8/12/2019 Printed QTP QA

http://slidepdf.com/reader/full/printed-qtp-qa 5/17

1.6$at is Quic% test proH

Its a Mercury interacti#es %ey!ord dri#en testing tool.By using QTP !$at %ind of applications !e can testH

By using QTP !e can test standard !indo!s applications,6e) o)*ects,/cti#e controls,and =isual )asic

applications.5.6$at is called as testH

Test is a collection of steps organized into one or (ore actions,!$ic$ are used to #erify t$at your

application perfor(s as expected

2.6$at is t$e (eaning of )usiness co(ponentHIts a collections of steps representing a single tas% in your application. Business co(ponents are co()ined

into specific scenario to )uild )usiness process tests in Mercury Quality center !it$ Business process

testing:.Fo! t$e test !ill )e created in QTPH

/s !e na#igate t$roug$ our application,QTP records eac$ step !e perfor( and generates a test or

co(ponent t$at grap$ically displays t$eses steps in an ta)le-)ased %ey!ord #ie!.;.6$at are all t$e (ain tas%s !$ic$ !ill )e acco(plis$ed )y t$e QTP after creating a testH

/fter !e $a#e finis$ed recording,!e can instruct QTP to c$ec% t$e properties of specific o)*ects in our

application )y (eans of en$ance(ent features a#aila)le in QTP. 6$en !e perfor( a run session,QTP perfor(s eac$ step in our test or co(ponent. /fter t$e run session ends,!e can #ie! a report detailing

!$ic$ steps !ere perfor(ed,and !$ic$ one succeeded or failed.>.6$at is /ctionsH

/ test is co(posed of actions. T$e steps !e add to a test are included !it$ in t$e tests actions. By eac$test )egin !it$ a single action. 6e can di#ide our test into (ultiple actions to organize our test.

&.6$at are all t$e (ain stages !ill in#ol#e in QTP !$ile testingH

H Creating tests or )usiness co(ponentsH unning tests or )usiness co(ponents

H /nalyzing results

.Fo! t$e creation of test !ill )e acco(plis$ed in QTPH6e can create t$e test or co(ponent )y eit$er recording a session on our application or !e) site or

 )uilding an o)*ect repository and adding steps (anually to t$e %ey!ord #ie! using %ey!ord-dri#en

functionality. 6e can t$en (odify our test !it$ progra((ing state(ents.1'.6$at is t$e purpose of docu(entation in %ey !ord #ie!H

T$e docu(entation colu(n of t$e %ey !ord #ie! used to displays a description of eac$ step in easy to

understand sentences.

11.ey!ord #ie! in QTP is also ter(ed asIcon )ased #ie!

1.6$at is t$e use of data ta)le in QTPH

 para(eterizing t$e test15.6$at is t$e use of !or%ing !it$ actionsH

To design a (odular and efficient tests

12.6$at is t$e file extension of t$e code file and o)*ect repository file in QTPH

T$e extension for code file is .#)s and t$e extension for o)*ect repository is .tsr 1:.6$at are t$e properties !e can use for identifying a )ro!ser and page !$en using descripti#e

 progra((ingH

T$e na(e property is used to identify t$e )ro!ser and t$e title property is used to identify t$e page1;.6$at are t$e different scripting languages !e can use !$en !or%ing !it$ QTPH

=B script

1>.Ei#e t$e exa(ple !$ere !e can use a COM interface in our QTP pro*ectHCOM interface appears in t$e scenario of front end and )ac% end.

1&.0xplain t$e %ey!ord createo)*ect !it$ exa(ple

createo)*ect is used to create and return a reference to an auto(ation o)*ect.8or exa(ple3

Page 6: Printed QTP QA

8/12/2019 Printed QTP QA

http://slidepdf.com/reader/full/printed-qtp-qa 6/17

"i( 0xcel$eetet

0xcel$eetJcreateo)*ect9K0xcel.$eetL71.Fo! to open excel s$eet using QTP scriptH

4ou can open excel in QTP )y using t$e follo!ing co((and

yste(.+til.unLPat$ of t$e fileL'.Is it necessary to learn =B script to !or% !it$ QTPH

Its not (andate t$at one s$ould (astered in =B script to !or% !it$ QTP. It is (ostly user friendly and for

good results !e need to $a#e )asic =B or concepts !$ic$ !ill suffice

1.If 6inunner and QTP )ot$ are functional testing tools fro( t$e sa(e co(pany. 6$y a separate toolQTP ca(e in to pictureH

QTP $as so(e additional functionality !$ic$ is not present in 6inunner. 8or exa(ple,you can

test98unctionality and egression testing7 an application de#eloped in .?et tec$nology !it$ QTP,!$ic$ isnot possi)le to test in 6inunner 

.0xplain in )rief a)out t$e QTP auto(ation o)*ect (odel

T$e test o)*ect (odel is a large set of o)*ect types or classes t$at QTP uses to represent t$e o)*ects in ourapplication. 0ac$ test o)*ect $as a list of properties t$at can uniuely identify o)*ects of t$at class

5.6$at is a un-Ti(e data ta)leH

T$e test results tree also includes t$e ta)le-s$aped icon t$at displays t$e run-ti(e data ta)le-a ta)le t$ats$o!s t$e #alues used to run a test containing data ta)le para(eters or t$e data ta)le output #alues

retrie#ed fro( a application under test2.6$at are all t$e co(ponents of QTP test scriptH

QTP test script is a co()ination of =B script state(ents and state(ents t$at use Quic%Test test o)*ects,(et$ods and properties

:. 6$at is test o)*ectH

Its an o)*ect t$at QTP uses to represent an o)*ect in our application. 0ac$ test o)*ect $as one or (ore(et$ods and properties t$at !e can use to perfor( operations and retrie#e #alues for t$at o)*ect. 0ac$

o)*ect also $as a nu()er of identification properties t$at can descri)e t$e o)*ect.

;.6$at are all t$e rules and guidelines !ant to )e follo!ed !$ile !or%ing in expert #ie!HCase-sensiti#ity

=B script is not case sensiti#e and does not differentiate )et!een upper case and lo!er case spelling of

!ords.Text strings

6$en !e enter #alue as a string, t$at ti(e !e (ust add uotation (ar%s )efore and after t$e string

=aria)les

6e can use #aria)les to store strings,integers,arrays and o)*ects. +sing #aria)les $elps to (a%e our script(ore reada)le and flexi)le.

Parent$eses

To ac$ie#e t$e desired result and to a#oid t$e errors,it is i(portant t$at !e use parent$eses97 correctly inour state(ents.

Co((ents

6e can add co((ents to our state(ents using apostrop$e97,eit$er at a )eginning of t$e separate line or at

t$e end of a state(entpaces

6e can add extra )lan% spaces to our script to i(pro#e clarity. T$e =B script ignores t$ese spaces.

Page 7: Printed QTP QA

8/12/2019 Printed QTP QA

http://slidepdf.com/reader/full/printed-qtp-qa 7/17

Quic% Test Professional 8/Q<s

------------------------------1. Fo! QTP scripts are ad#antageous !$en need to re-!or% t$e sa(e )usiness scenariosH

/. To record t$e Quic% Test Professional cript on one instance and )e a)le to execute it on any ot$erinstance. T$e assu(ption is t$ere are no (a*or E+I c$anges )et!een t$e recorded and t$e execution

instances.

. Fo! can you (a%e t$e scripts generic and !$at arc$itecture needs to )e follo!edH

/. In order to ac$ie#e t$e a)o#e o)*ecti#e, !e need to plan t$e Quic% Test Professional script. It s$ould$a#e t!o parts3

1. cript t$at is generic Quic% test script.

. "ata fro( t$e para(eter file t$at is custo(er instance specific.

0g. I(agine a )usiness flo! $as a scenario

- Gogin to t$e !e) page- C$ec% (ail

- Gogout1. Create dataApara(eter file 9can )e flat file N.txt or an excel file7 is instance specific.

. Create 9recordAprogra(7 t$e QTP initialization5. T$e initialization script !$ic$ calls t$e O)*ect repository, co((on function li)rary and all QTP

actionsAscripts

5. Fo! to create an indi#idual scriptH

/. ecord t$e Quic% Test Professional script and (odify it to (a%e it a generic script using t$e follo!ing

steps3

a. et t$e testing options in t$e Test ettings "ialog )ox.

 ). ecord t$e script

c. Modify t$e script to (a%e it generic3

i. Para(eterize t$e $ard coded #alues.ii. Modify t$e O)*ect epository file !it$ regular expressions.

iii. /dd uniue properties to ite(s in t$e O)*ect epository to (a%e recognition si(pler.

i#. Insert sync$ronization points as reuired.#. Insert c$ec%points for passAfail #alidation.

#i. Insert additional progra((ing logic.

#ii. +se t$e Co((on 8unctions.

2. 6$at is t$e testing process in QTPH

/. T$e testing process consists of 5 (ain p$ases3

1. Eat$er rele#ant test infor(ation Input data s$ould )e gat$ered.

. Create t$e )asic test ecordAProgra( t$e scripts in actions

Page 8: Printed QTP QA

8/12/2019 Printed QTP QA

http://slidepdf.com/reader/full/printed-qtp-qa 8/17

5. 0n$ance t$e )asic test+se "ata "ri#en scripts to use t$e script to test !it$ different sets of data

eusa)le /ctions- Identify t$e co((on scenarios and (a%e t$e scripts generic and reuse t$e scripts across

different )usiness scenarios.

:. 6$at are different types of recording (odes in QTPH

/. T$ere are t!o recording (odes

1. Go!-le#el

. /nalog

Go! Ge#el ecording3

+se Go!-Ge#el ecording !$en you need to record t$e exact location of t$e o)*ect on your application

screen.

To record in Go!-Ge#el ecording, select KGo!-Ge#el ecordingL fro( t$e KTestL (enu !$ile recording

/nalog3

+se /nalog ecording for applications in !$ic$ t$e actual (o#e(ent of t$e (ouse is !$at you !ant torecord.

To record in /nalog (ode, select K/nalog ecordingL fro( t$e KTestL (enu !$ile recording.

;. 6$at is O)*ect repositoryH

/. T$e O)*ect epository dialog )ox displays a test tree of all o)*ects in t$e current action or t$e entire

test 9depending on t$e o)*ect repository (ode you c$oose !$en you create your test7. 4ou can use t$e

O)*ect epository dialog )ox to #ie! or (odify t$e properties of any test o)*ect in t$e repository or to addne! o)*ects to your repository.

O)*ect epository Modes

Per /ction O)*ect epository3

T$is is t$e default setting, and all tests created in Quic%Test :.; or earlier use t$is (ode. In t$is (ode,

Quic%Test auto(atically creates an o)*ect repository file for eac$ action in your test so t$at you can recordand run tests !it$out creating, c$oosing, or (odifying o)*ect repository files.

$ared O)*ect epository3

In t$is (ode, you can use one o)*ect repository file for (ultiple tests if t$e tests include t$e sa(e o)*ects.

O)*ect infor(ation t$at applies to (any tests is %ept in one central location. 6$en t$e o)*ects in yourapplication c$ange, you can update t$e( in one location for (ultiple tests

>. Fo! to select t$e O)*ect repository (odeH

/. To select t$e o)*ect repository (ode

Eoto Test ettings esource Ta) to c$ange t$e O)*ect epository Mode

T$e default o)*ect repository file na(e is default.tsr 

Page 9: Printed QTP QA

8/12/2019 Printed QTP QA

http://slidepdf.com/reader/full/printed-qtp-qa 9/17

4ou can c$ange o)*ect repository (ode !$en t$e Test contain no actions.

&. 6$at is /cti#e screenH 6$at are t$e ad#antages of /cti#e screenH

/. /cti#e screen captures all t$e properties of t$e application and (a%es a#aila)le e#en !$en offlineA

!$en you are not connected to t$e application.

T$e (ain ad#antage is c$ec%points can )e added !it$out connecting to t$e application

. 6$at are different creen capture options a#aila)le for /cti#e screenH

/. Co(pleteDCaptures all properties of all o)*ects in t$e application<s acti#e !indo!Adialog )oxA6e)

 page in t$e /cti#e creen of eac$ step. T$is le#el sa#es 6e) pages after any dyna(ic c$anges and sa#es

/cti#e creen files in a co(pressed for(at.

PartialD9"efault7. Captures all properties of all o)*ects in t$e application<s acti#e !indo!Adialog

 )oxA6e) page in t$e /cti#e creen of t$e first step perfor(ed in an application<s !indo!, plus all properties of t$e recorded o)*ect in su)seuent steps in t$e sa(e !indo!. T$is le#el sa#es 6e) pages

after any dyna(ic c$anges and sa#es /cti#e creen files in a co(pressed for(at.

Mini(u(DCaptures properties only for t$e recorded o)*ect and its parent in t$e /cti#e creen of eac$step. T$is le#el sa#es t$e original source FTMG of all 6e) pages 9prior to dyna(ic c$anges7 and sa#es

/cti#e creen files in a co(pressed for(at.

 ?oneD"isa)les capturing of /cti#e creen files for all applications and 6e) pages.

1'. Fo! QTP identifies t$e o)*ects in t$e application during runti(eH

/. QTP uses different properties to identify t$e o)*ects in t$e applications. T$ey are3a. Mandatory Properties

 ). /ssisti#e Properties

c. O)*ect Identifies

d. (art Identification

11. 0xplain all O)*ect identification properties.

/. Mandatory and /ssisti#e Properties3

"uring t$e test run, Quic%Test loo%s for o)*ects t$at (atc$ all properties in t$e test o)*ect description - it

does not distinguis$ )et!een properties t$at !ere learned as (andatory properties and t$ose t$at !erelearned as assisti#e properties

(art Identification3 Quic%Test uses a #ery si(ilar process of eli(ination !it$ its (art Identification(ec$anis( to identify an o)*ect, e#en !$en t$e recorded description is no longer accurate. 0#en if t$e

#alues of your test o)*ect properties c$ange, Quic%Test<s TestEuard tec$nology (aintains your test<s

reusa)ility )y identifying t$e o)*ect using (art Identification.

1. 6$at are Ordinal identifies. 0xplain in detail.

Page 10: Printed QTP QA

8/12/2019 Printed QTP QA

http://slidepdf.com/reader/full/printed-qtp-qa 10/17

/. Ordinal Identifiers are

Index3Indicates t$e order in !$ic$ t$e o)*ect appears in t$e application code relati#e to ot$er o)*ects !it$ an

ot$er!ise identical description.

Gocation3

Indicates t$e order in !$ic$ t$e o)*ect appears !it$in t$e parent !indo!, fra(e, or dialog )ox relati#e to

ot$er o)*ects !it$ an ot$er!ise identical description. =alues are assigned fro( top to )otto(, and t$en left

to rig$t.

T$e 6e) Bro!ser o)*ect $as a t$ird ordinal identifier type3

Creation Ti(e3

Indicates t$e order in !$ic$ t$e )ro!ser !as opened relati#e to ot$er open )ro!sers !it$ an ot$er!ise

identical description.

15. 6$at is (art IdentificationH

/. (art Identification3If Quic%Test is una)le to find any o)*ect t$at (atc$es t$e recorded o)*ect description, or if it finds (ore

t$an one o)*ect t$at fits t$e description, t$en Quic%Test ignores t$e recorded description, and uses t$e(art Identification (ec$anis( to try to identify t$e o)*ect.

6$ile t$e (art Identification (ec$anis( is (ore co(plex, it is (ore flexi)le, and t$us, if configuredlogically, a (art Identification definition can pro)a)ly $elp Quic%Test identify an o)*ect, if it is present,

e#en !$en t$e recorded description fails.

12. 6$at are t$e properties a#aila)le in (art identificationH

/. Base filter properties3

T$e (ost funda(ental properties of a particular test o)*ect class t$ose !$ose #alues cannot )e c$anged

!it$out c$anging t$e essence of t$e original o)*ect. 8or exa(ple, if a 6e) lin%<s tag !as c$anged fro(

Optional filter properties3Ot$er properties t$at can $elp identify o)*ects of a particular class as t$ey are unli%ely to c$ange on a

regular )asis, )ut !$ic$ can )e ignored if t$ey are no longer applica)le.

1:. 6$at is O)*ect pyH Fo! is it used in QTPH

/. +sing t$e O)*ect py, you can #ie! t$e run-ti(e or test o)*ect properties and (et$ods of any o)*ect in

an open application. 4ou use t$e O)*ect py pointer to point to an o)*ect. T$e O)*ect py displays t$e

selected o)*ect<s $ierarc$y tree. It displays t$e run-ti(e or test o)*ect properties and #alues of t$e selectedo)*ect in t$e Properties ta). It displays t$e run-ti(e or test o)*ect (et$ods associated !it$ t$e selected

o)*ect in t$e Met$ods ta)

1;. 6$at are un-Ti(e O)*ect Properties A un-Ti(e O)*ect Met$odsH

/. un-Ti(e O)*ect Properties A un-Ti(e O)*ect Met$ods3

Page 11: Printed QTP QA

8/12/2019 Printed QTP QA

http://slidepdf.com/reader/full/printed-qtp-qa 11/17

4ou can use t$e O)*ect property to access t$e nati#e properties of any run-ti(e o)*ect. 8or exa(ple, you

can retrie#e t$e current #alue of t$e /cti#e calendar<s internal "ay property as follo!s3

0g. a(ple code

"i( My"ayet My"ay J Bro!ser9index7.Page9+ntitled7./cti#e9MC/G.Calendar.>7.O)*ect."ay

1>. 6$at are Test O)*ect Properties A Test O)*ect Met$odsH

/. Test O)*ect Properties A Test O)*ect Met$ods3

4ou can use t$e EetTOProperty and etTOProperty (et$ods to retrie#e and set t$e #alue of test o)*ect properties for test o)*ects in your test.

4ou can use t$e EetOProperty to retrie#e t$e current property #alue of o)*ects in your application duringt$e test run.

1&.6$at are +ser-"efined Test O)*ect Classes. Fo! are t$ey (appedH

/ +ser-"efined Test O)*ect Classes3

T$e O)*ect Mapping dialog )ox ena)les you to (ap an o)*ect of an unidentified or custo( class to atandard 6indo!s class. 8or exa(ple, if your application $as a )utton t$at cannot )e identified, t$is

 )utton is recorded as a generic 6inO)*ect. 4ou can teac$ Quic%Test to identify your o)*ect as if it

 )elonged to a standard 6indo!s )utton class. T$en, !$en you clic% t$e )utton !$ile recording a test,Quic%Test records t$e operation in t$e sa(e !ay as a clic% on a standard 6indo!s )utton. 6$en you (ap

an unidentified or custo( o)*ect to a standard o)*ect, your o)*ect is added to t$e list of tandard 6indo!s

test o)*ect classes as a user-defined test o)*ect. 4ou can configure t$e o)*ect identification settings for auser defined o)*ect class *ust as you !ould any ot$er o)*ect class

1. 6$at are c$ec%pointsH

/. / c$ec%point is a #erification point t$at co(pares a current #alue for a specified property !it$ t$e

expected #alue for t$at property. T$is ena)les you to identify !$et$er your 6e) site or application isfunctioning correctly.

6$en you add a c$ec%point, Quic% Test adds a c$ec%point !it$ an icon in t$e test tree and adds a C$ec%Point state(ent in t$e 0xpert =ie!. 6$en you run t$e test, Quic% Test co(pares t$e expected results of

t$e c$ec%point to t$e current results. If t$e results do not (atc$, t$e c$ec%point fails. 4ou can #ie! t$e

results of t$e c$ec%point in t$e Test esults !indo!.

'. 6$at is a standard c$ec%pointH

/. 4ou can c$ec% t$at a specified o)*ect in your application or on your 6e) page $as t$e property #alues

you expect, )y adding a standard c$ec%point to your test. To set t$e options for a standard c$ec%point, youuse t$e C$ec%point Properties dialog )ox.

1. 6$at is Text or Text /rea C$ec%pointH

Page 12: Printed QTP QA

8/12/2019 Printed QTP QA

http://slidepdf.com/reader/full/printed-qtp-qa 12/17

/. Text or Text /rea C$ec%point esultsBy adding text or text area c$ec%points to your tests, you can c$ec% t$at a text string is displayed in t$e

appropriate place in your application or on your 6e) page. 6$en you run your test, Quic% Test co(pares

t$e expected results of t$e c$ec%point to t$e actual results of t$e test run. If t$e results do not (atc$, t$ec$ec%point fails.

5. 6$at is Bit(ap C$ec%pointH

/. Bit(ap C$ec%points3

4ou can c$ec% an area of a 6e) page or application as a )it(ap. 6$ile creating a test, you specify t$earea you !ant to c$ec% )y selecting an o)*ect. 4ou can c$ec% an entire o)*ect or any area !it$in an o)*ect.

Quic% Test captures t$e specified o)*ect as a )it(ap, and inserts a c$ec%point in t$e test. 4ou can also

c$oose to sa#e only t$e selected area of t$e o)*ect !it$ your test in order to sa#e dis% space.

2. 6$at is Ta)le and "ata)ase C$ec%pointH

/. Ta)le and "ata)ase C$ec%points3By adding ta)le c$ec%points to your tests, you can c$ec% t$at a specified #alue is displayed in a cell in a

ta)le on your 6e) page or in your application. By adding data)ase c$ec%points to your tests, you canc$ec% t$e contents of data)ases accessed )y your 6e) page or application. T$e results displayed for ta)le

and data)ase c$ec%points are si(ilar. 6$en you run your test, Quic% Test co(pares t$e expected results

of t$e c$ec%point to t$e actual results of t$e test run. If t$e results do not (atc$, t$e c$ec%point fails.

:. 6$at is /ccessi)ility C$ec%pointH

/. /ccessi)ility C$ec%points3

4ou can add accessi)ility c$ec%points to $elp you uic%ly identify areas of your 6e) site t$at (ay notconfor( to t$e 65C 96orld 6ide 6e) Consortiu(7 6e) Content /ccessi)ility Euidelines. 4ou can add

auto(atic accessi)ility c$ec%points to eac$ page in your test, or you can add indi#idual accessi)ility

c$ec%points to indi#idual pages or fra(es.

;. 6$at is MG C$ec%pointH

/. MG C$ec%point3

T$e MG C$ec%point Properties dialog )ox displays t$e ele(ent $ierarc$y and #alues 9c$aracter data7 of

t$e selected MG file.

elect t$e ele(ent9s7, attri)ute9s7, andAor #alue9s7 t$at you !ant to c$ec%. 8or eac$ ele(ent you !ant to

c$ec%, select t$e c$ec%s you !ant to perfor(. 8or eac$ attri)ute or #alue you !ant to c$ec%, select t$e

c$ec%s you !ant to perfor(, or t$e para(eterization options you !ant to set.

>. 6$at is ync$ronizationH

/. 6$en you run tests, your application (ay not al!ays respond !it$ t$e sa(e speed. 8or exa(ple, it

(ig$t ta%e a fe! seconds3

♣ for a progress )ar to reac$ 1''R

Page 13: Printed QTP QA

8/12/2019 Printed QTP QA

http://slidepdf.com/reader/full/printed-qtp-qa 13/17

♣ for a status (essage to appear 

♣ for a )utton to )eco(e ena)led

♣ for a !indo! or pop-up (essage to open

4ou can $andle t$ese anticipated ti(ing pro)le(s )y sync$ronizing your test to ensure t$at Quic% Test

!aits until your application is ready )efore perfor(ing a certain step.

&. 6$at are different functions a#aila)le for ync$ronizationH

/. T$ere are se#eral options t$at you can use to sync$ronize your test3

4ou can insert a sync$ronization point, !$ic$ instructs Quic% Test to pause t$e test until an o)*ect

 property ac$ie#es t$e #alue you specify. 6$en you insert a sync$ronization point into your test, Quic%Test generates a 6aitProperty state(ent in t$e 0xpert =ie!.

. 6$at is t$e difference in 0xistsA!ait state(entsH

/. 0xist 97A 6ait97

4ou can insert 0xist or 6ait state(ents t$at instruct Quic%Test to !ait until an o)*ect exists or to !ait a

specified a(ount of ti(e )efore continuing t$e test.

0g. Bro!ser94a$ooL7.Page9C$ec%MailL7.Button9KC$ec%MailL7.0xists91'7

QTP !aits for 1' seconds till t$e )utton exists in t$e page. T$e script proceeds if t$e )utton e#en exits )efore 1' seconds unli%e !ait97 state(ent it !aits for 1' seconds no (atter t$e )utton exits )efore 1'

seconds.

5'. 6$at is "efault Ti(e OutH

/. "efault Ti(e Out3

4ou can also increase t$e default ti(eout settings in t$e Test ettings and Options dialog )oxes in order to

instruct Quic% Test to allo! (ore ti(e for certain e#ents to occur 

51. 6$at is Para(eterization 9"ata Ta)le 6izard7H

/. 4ou can supply t$e list of possi)le #alues for a para(eter )y creating a "ata Ta)le para(eter. "ata

Ta)le para(eters ena)le you to create a data-dri#en test 9or action7 t$at runs se#eral ti(es using t$e data

you supply. In eac$ repetition, or iteration, Quic% Test su)stitutes t$e constant #alue !it$ a different #aluefro( t$e "ata Ta)le.

5. 6$at are Met$od /rgu(entsH

/. +sing Met$od argu(ents you para(eterize (et$od argu(ents in t$e Met$od /rgu(ents dialog )ox. to

open t$e Met$od /rgu(ents dialog )ox, rig$t-clic% a step containing a (et$od in t$e test tree and c$ooseMet$od /rgu(ents. T$e Met$od /rgu(ents dialog )ox opens and displays t$e (et$od argu(ents in t$e

step.

Page 14: Printed QTP QA

8/12/2019 Printed QTP QA

http://slidepdf.com/reader/full/printed-qtp-qa 14/17

55. 6ell, I !ould li%e to run (y test !it$ different sets of data, Fo! can I (a%e it !it$ t$e options

a#aila)le in QTPH

/. Gisted are t$e different "ata Ta)le Iterations

un one iteration only3

uns t$e test only once, using only t$e first ro! in t$e glo)al "ata Ta)le.

un on all ro!s3

uns t$e test !it$ iterations using all ro!s in t$e glo)al "ata Ta)le.

un fro( ro! SS to ro! SS 3uns t$e test !it$ iterations using t$e #alues in t$e glo)al "ata Ta)le for t$e specified ro! range.

52. 6$at are different data ta)les a#aila)leH

/. 1. Elo)al $eetT$e Elo)al s$eet contains t$e data t$at replaces para(eters in eac$ iteration of t$e test.

. /ction $eets0ac$ ti(e you add a ne! action to t$e test, a ne! action s$eet is added to t$e "ata Ta)le. /ction s$eets

are auto(atically la)eled !it$ t$e exact na(e of t$e corresponding action. T$e data contained in an actions$eet is rele#ant for t$e corresponding action only.

5:. 6$at is an /ctionH

/. /n Quic% test script contains different actions. /n action contains t$e script ie. / piece of )usinessscenario li%e, login to application, logout etc.

6ell again It depends on $o! you create your fra(e!or% 9 If you !ould li%e to %no! (ore a)out fra(e!or% c$ec% out t$is lin%. Eood one. $ttp3AA!!!-1&.i)(.co(Ade#eloper!or%sArationalAli)raryA:1.$t(l7

for testing t$e applications.

I !ould suggest e#ery action $as a piece of )usiness scenario !$ic$ !ould $elp to re-use t$e script in a

 )etter !ay. Before deciding !$at are re-usa)le scripts. 8irstly, identify all t$e co((on scenarios t$atoccur in different )usiness flo!s across different (odules.

T$en prepare t$e scripts and (a%e generic. 4ou can call all t$ese functions )y (a%ing t$is co((on

function li)rary a#aila)le at Test options esourses.

5;. 6$at is Copy of actionH

/. Copy of /ction3

6$en you insert a copy of an action into a test, t$e action is copied in its entirety, including c$ec%points, para(eterization, and t$e corresponding action ta) in t$e "ata Ta)le. If t$e test you are copying into uses

 per-action repository (ode, t$e copied action<s action o)*ect repository !ill also )e copied along !it$ t$e

action.

5>. 6$at are re-usa)le actionsH

Page 15: Printed QTP QA

8/12/2019 Printed QTP QA

http://slidepdf.com/reader/full/printed-qtp-qa 15/17

/. eusa)le /ctions3

"eter(ines !$et$er t$e action is a reusa)le action. / reusa)le action can )e called (ultiple ti(es !it$in atest and can )e called fro( ot$er tests. ?on-reusa)le actions can )e copied and inserted as independent

actions, )ut cannot )e inserted as calls to t$e original action.

5&. !$at a)out Call of /ctionH

/. 4ou can insert a call 9lin%7 to a reusa)le action t$at resides in your current test 9local action7, or in anyot$er test 9external action7.

5. 6$en to Insert transactionsH

/. Inserting Transactions3

 "uring t$e test run, t$e tart Transaction signals t$e )eginning of ♣ t$e ti(e (easure(ent. 4ou define t$e

 )eginning of a transaction in t$e tart Transaction dialog )ox

♣ T$e 0nd Transaction signals t$e end of t$e ti(e (easure(ent

2'. 6$at are reular expressionsH

/. egular 0xpressions3

egular expressions ena)le Quic%Test to identify o)*ects and text strings !it$ #arying #alues. 4ou canuse regular expressions !$en3

"efining t$e property #alues of an o)*ect

Para(eterizing a step Creating c$ec%points !it$ #arying #alues

/ regular expression is a string t$at specifies a co(plex searc$ p$rase. By using special c$aracters suc$ asa period 9.7, asteris% 9U7, caret 9V7, and )rac%ets 9N 7, you can define t$e conditions of a searc$. 6$en oneof t$ese special c$aracters is preceded )y a )ac%slas$ 9W7, Quic%Test searc$es for t$e literal c$aracter.

Fere is an exa(ple3

T$e actual pattern for t$e regular expression searc$ is set using t$e Pattern property of t$e eg0xp o)*ect.T$e eg0xp.Elo)al property $as no effect on t$e Test (et$od.

T$e Test (et$od returns True if a pattern (atc$ is found 8alse if no (atc$ is found.

T$e follo!ing code illustrates t$e use of t$e Test (et$od.8unction eg0xpTest9patrn, strng7

"i( reg0x, ret=al Create #aria)le.

et reg0x J ?e! eg0xp Create regular expression.reg0x.Pattern J patrn et pattern.

reg0x.IgnoreCase J 8alse et case sensiti#ity.

ret=al J reg0x.Test9strng7 0xecute t$e searc$ test.If ret=al T$en

eg0xpTest J One or (ore (atc$es !ere found.

0lse

eg0xpTest J ?o (atc$ !as found.0nd If 

0nd 8unction

Page 16: Printed QTP QA

8/12/2019 Printed QTP QA

http://slidepdf.com/reader/full/printed-qtp-qa 16/17

MsgBox9eg0xpTest9is., I1 is I5 is277

21. Create a script to print t$e (essage

/.

"i( My=ar 

My=ar J MsgBox 9Fello 6orldX, ;:, MsgBox 0xa(ple7

My=ar contains eit$er 1 or , depending on !$ic$ )utton is clic%ed.

2. Gist all t$e run ti(e errors in =B script./. =Bcript run-ti(e errors are errors t$at result !$en your =Bcript script atte(pts to perfor( an action

t$at t$e syste( cannot execute. =Bcript run-ti(e errors occur !$ile your script is )eing executed !$en

#aria)le expressions are )eing e#aluated, and (e(ory is )eing dyna(ic allocated.0rror ?u()er "escription

2 /cti#e co(ponent cant create o)*ect

:'> /n exception occurred

22 /rgu(ent not optional

1> Cant perfor( reuested operation

25' Class doesnt support /uto(ation

:'; Class not defined

11 "i#ision )y zero

2& 0rror in loading "GG

:'' 0xpected 7 in regular expression

:'1 0xpected in regular expression

25 8ile na(e or class na(e not found during /uto(ation operation

8or loop not initialized

:''& Illegal assign(ent

:1 Internal error 

:': In#alid or unualified reference

2&1 In#alid picture

: In#alid procedure call or argu(ent

:'1 In#alid range in c$aracter set

Page 17: Printed QTP QA

8/12/2019 Printed QTP QA

http://slidepdf.com/reader/full/printed-qtp-qa 17/17

2 In#alid use of ?ull

22& ?a(ed argu(ent not found

22> O)*ect doesnt support current locale setting

22: O)*ect doesnt support t$is action

25& O)*ect doesnt support t$is property or (et$od

2:1 O)*ect not a collection

:'2 O)*ect not safe for creating

:'5 O)*ect not safe for initializing

:' O)*ect not safe for scripting

22 O)*ect reuired

1 O)*ect #aria)le not set

> Out of Me(ory

& Out of stac% space

12 Out of string space

; O#erflo!

5: u) or function not defined

u)script out of range

:'1> yntax error in regular expression

2; T$e re(ote ser#er (ac$ine does not exist or is una#aila)le

1' T$is array is fixed or te(porarily loc%ed

15 Type (is(atc$

:'1& +nexpected uantifier 

:'' =aria)le is undefined

2:& =aria)le uses an /uto(ation type not supported in =Bcript

2:' 6rong nu()er of argu(ents or in#alid property assign(ent