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.



In my application I was supposed to test two columns.The first column1 belongs to one module and t..

Answer / 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

More WinRunner Interview Questions

Data is there in two excel sheets .. how ur going to retrive the data in winrunner thru script.. write down the script?

3 Answers   AZTEC,


Is load testing is possible with WR?

1 Answers  


how many checkpoints are provided by WR

3 Answers   Ordain Solutions,


How many check points are there in winrunner? what are they?

8 Answers   BeBo Technologies,


Besides Record and Replay what else can we do with WinRunner?

1 Answers  






What is GapAnalysis? i am not getting the coorct answer for this question still now.

3 Answers   Semantic Space,


How to break infinite loop?

0 Answers  


Is it possible to place a Logical name in a data table and can use that logical name in the script? Tell me with mentioning function names..?

1 Answers   Accenture,


write a function for addition of two numbers

1 Answers   Polaris,


How do you filter the objects in the gui map?

0 Answers  


The default type of Constants and variables supported by TSL are..

2 Answers   FCG,


what is the procedure do u follow for writing the test scripts

1 Answers   Agile Software,


Categories