In my application I was supposed to test two columns.The
first column1 belongs to one module and the other column2
belongs to other module.The content in both the columns is
same.I supposed to check whether the data present in the
column1 is same as the one in column2.

Each column contains number of rows.So checking each row
manually is diificult.Is there any option available in
WinRunner or QTP to check the column data.These two columns
are available in Data Base Tables.

One way is that I can just number of rows in each column so
that I can get rows count of both the columns,but apart
from that I was supposed to check whether the data is also
same in both the tables.

Can anybody suggest me how I can go about this.

Answer Posted / poonam

Following is the solution for your query.

# Fetching Information from Database
j = db_connect
("query1","DSN=<name>;UID=<user_id>;PWD=<user_pwd>",30);
if (j == E_OK) {
db_execute_query("query1", "select * from
<table name>", record_no);
for(i = 1;i <= record_no; i++) {
k = i-1;
val = db_get_field_value
("query1", "#"&k, "#0");
val1 = db_get_field_value
("query1", "#"&k, "#1");
if (val == val1)
report_msg("Values are
same "&val "and " &val1);
else
report_msg("Values are not
same");
}
}
else
report_msg("Database Connection Failed");

db_disconnect("query1");

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Have you used winrunner in your project?

777


Are there any suitable free tools to conduct performance test on a php web application?Manual or automation which is preferable for such kind of application? please answer ASAP

2043


what is mean by release in quality center and who will perfom?

2694


Explain the synchronization points?

791


What different actions are performed by find and show button?

862


Could you anyone share me the path to download the automation tools which are having trial license version?

1860


What do you mean by the logical name of the object.

840


For my web Application I am recording website by WR. but the fuctions are displaying normal recorded fun. such as set_window...etc. eventhough i selected web add-in at start up WR. how to use web functions? such as web_link_click.... pls. guide

1985


Difference between winrunner and test director?

896


Name the different modes of recording?

754


How enviornment veriable can be included into my script. I want to include some information into my Excel file using Test run in WR. like User name of system? waht is function to be used? Please clarify.....

1955


How to break infinite loop?

848


What is the XML test cases creation?

2417


How you integrated your automated scripts from TestDirector?

826


Write test scripts on a scenario where you have to transfer data from one table to another.

1792