How many ways we can parameterize data in QTP ?

Answer Posted / kondalu

parameterize three ways in qtp
1.keywordview
2.experview(parameterisation)
3.manually scripting


1.expertview(parameterisation):
any application open for example calculator
and recording that application
vbwindow("form1").activate
vbwindow("form1").vbedit("value1").set "10"
vbwindow("form1").vbedit("value2").set "20"
vbwindow("form1").vbbutton("add").click
data table as import or automatically created
v1 v2 ev
10 20 30
20 30 50
30 40 70 datatable to be created
in tools option datadriver(no recording script
datadriver is disable and recording script data driver is
enable)
datadriver is selected after (for example

10 1 0) go parameterise and select parameterise option
and select v1 click on ok button first v1 is parameterised
(parameterise means 1 value changed in 0 and 0 value
changed in 1) and same as v2
finally click on recording as go to checkpoint and
select standard check point click on result and to go
parameterise and parameterise options select ev click on ok
button
(second recording in checkpoint in result in script as
beging cursor checkpoint as begining statement but finally
datatable 3 lines created first line will be correct ,2nd
and 3rd line will be error.
but cusor will be ending means 2nd recording as
chekpoint and select standard checkpoint selecting result
option "vbwindow("form1").check checkpoint("result")"
this statement as ending data table in 3 lines are passed
and result willbe passed

(this is one type of method)

vbwindow("form1").vbedit("value1").set datatable
("v1",dbglobalsheet)
vbwindow("form1").vbedit("value2").set datatable
("v2",dbglobalsheet)
global sheet means in qtp datatable in
first in globalsheet (dbglobalsheet=1)
vbwindow("form1").check checkpoint("res")


vbwindow("form1").vbedit("value1").set datatable
("v1",1)
vbwindow("form1").vbedit("value2").set datatable
("v2",1)

datatable("v1",1) as given in a
datatable("v2",2) as given in b


MANAUAL SCRIPT IN PARAMETERISATION
a=datatable("v1",1)
vbwindow("form1").vbedit("value1").set a
b=datatable("v2",1)
vbwindow("form1").vbedit("value2").set b
vbwindow("form1").check checkpoint("res") IN THIS statement
begining datatable in 3 lines 1 line pass 2nd and 3rd line
failed
ending three lines will be passed

Is This Answer Correct ?    4 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is there anyway to automatically update the Datasource name in Database Checkpoints object when we migrate tests to a new release?

3271


How to build scripts that access data from external sources?

1607


hi, can u tell me the QTP TEsting process in present real time companies?(beware of this... now a days Recording is not using,, only DP) and don't tell note book answers like step 1 spep2....like this .......post answer with professional skills in simple english words) thank u

1329


how to know no.of mails in our g mail by using vb-script

1779


What are the check points can be inserted without recording?

596






How can you send user defined messages to test report?

584


Can we record using all the modes in a single script? Explanation with example is appreciated

1390


How will you test a keyboard?

601


Write the code for,In the page screen we have total 10 Links,out of these I have to click 9th link

869


in qtp 3 sheets is there in data table like global, action1, action2. I want to check the rows and columns in action2. how can check using script?

6327


Is it possible to use two instances of UFT on the same machine? If not why?

602


in my application,validation message has in japanise language.how to validate this message is appears properly or not

1523


Hi. I have completed B.TECH(CS) , But I will go to "SECURITY CONSOLE OPERATING" [C.C CAMERA abservation]. IF interviwer asks " Why you choose this job ?" What we will say? urgent.........................urgent...........

1445


how to write xml output check point bu useing descriptive programing .means without useing output check point

1654


Have you faced any problems with object repository?

592