QTP Script for Data Driven Testing using Datatable

This Script gives result by retreiving values from datatable.

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

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

No comments:

Related Posts Plugin for WordPress, Blogger...