This Script gives result by retreiving values from datatable.
A B
5 5
6 6
7 7
8 8
9 9
In datatable enter test data as shown above.
Fill values below "A" and "B"
script required for DDT(data driven testing)is
val1=datatable("A",1)
val2=datatable("B",1)
res=cint(val1) +cint(val2)
msgbox res
Result will be 10,12,14,16,18.
datatable("column name",sheetname/id)
cint is a function which converts string to integer.
check what will happen if u are not using cint in third step.
just replace this res=val1+val2 in place of res=cint(val1) +cint(val2)
QTPScript for connecting to database
Script for Messagebox to disappear after certain time
QTP Faqs
Manual Faqs
Sql Server Faqs
Showing posts with label manual script for datadriven. Show all posts
Showing posts with label manual script for datadriven. Show all posts
QTP Script for Data Driven Testing using Datatable
Subscribe to:
Comments (Atom)