Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Feeding the test iteration from database - non descriptive way?
#1
Not Solved
Hi
I am a beginner.

This is my requirement:
Just before the test starts or as a first step in the test, test has to go to database, issue a select query, get rows of values into the global data table, then run the test iterations using each row of the global data table. My test actions will have parameters pointing to the data at a certain column of the global data table.

This is what I have tried so far:
1. Importing data from database into global data table.
On the global data table, when I right clicked, I saw an option (Sheet->Import->From Database) to import from database. I could not figure out if this is dynamic; I mean, every time I run the test, does the sheet get filled by re-running the query? Or does it save the data once and for all with the test itself?. Does anyone know?
I also see a (Data->ReCalc) option when right-clicking on global datasheet. Does this apply only to data table sheet formulas or also to importing from database?

2. Insert output Value -> Database output value
Can this be used for my scenario? If yes, could you give me some key pointers on how?

-------------------------

After looking through some threads, I found in this forum, some descriptive code that opens a connection, runs a query, gets values from database and fills into the global data table.

I would prefer to do it non descriptive way (using menu options, etc) if its possible.


Thanks for your time.
Reply
#2
Not Solved
I could not define and use a Database Output value for my purpose. Or I do not know how to do it.

This is my insight
1. Using Output Value
Every Output value, even if there exists multiple rows as a result of the select query, map/point always to a new column in the first row of the data table. So this would correspond to only one iteration of the test (no matter how many rows we get as a result of our SQL query).

I was expecting something like, if I get 5 rows as a result of my database query, correspondingly I would like to map each row to a row in the data-table and I would like to have 5 iterations in the test.


2. Using data-sheet import from database

Also when I try to use the import feature in data-sheet, it is static. So next time I run, I have to redo import to get the latest data.



This kind of concludes like, the only way to map each result row of sql query to a row in data-table is through descriptive (script) programming.

Since I am new to QTP, please advise me if I am missing anything

Thanks
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Object not found during the 2nd iteration of an Action call in a For loop BGunay 0 968 04-23-2020, 07:08 PM
Last Post: BGunay
  UFT Tool runs more than one iteration always cthossain 2 3,717 02-12-2017, 01:25 PM
Last Post: cthossain
  Function return value is not passed during the 3rd iteration premanand1979 0 2,253 10-16-2014, 09:40 PM
Last Post: premanand1979
  Iteration in Local sheets for UFT11.5 haithamQTP 1 3,191 02-27-2014, 09:12 AM
Last Post: supputuri
  Parameter iteration bistritapcv 1 3,393 03-28-2013, 10:40 AM
Last Post: Sathiya

Forum Jump:


Users browsing this thread: 1 Guest(s)