Retrieving Data from Oracle DB and loading into an excel or CSV file
I have a scenario where i need to run a query and retrieve the test data from Oracle DB and load it to a Excel or any file format that I can re-use that test data for another script in load runner. And i need to be able to do this on the fly.
Can this be accomplished? If so any suggestions on how to do that.
Any help would be highly appreciated.
Here is a detailed description of my issue.
When one of our batch job runs, it creates some data like Object Ids, Usernames, and Pwds in the Oracle DB. I need to be able to run a LR script to query that data and store it to a excel or a notepad and use that data (usernames and pwds) for runinng a load test with another script. The data is very dynamic and I need to capture that on the fly and use it for my Load runner scripts and run a load test.
While the load test is being run I also need to invoke an executable or a batch file that will notify the DB that the transaction is complete. Can this be done?
Is this during a test?
If so it's unlikely that writing out to a file will work...
I suggest you either look at the VTS (especially if you are using LR11.52 as it's just had a refresh) or a DB solution (MySQL is well documented by both Richard Bishop and Stuart Moncrieff- Google is your friend here)
as these will allow you to both write to and read from the dynamic data source - without having to jump through too many hoops
as for notifying the Oracle DB - how are you doing this? a little more info may help get a sensible answer
Last edited by JimHowell1970; 05-29-2013 at 03:43 AM.
Thanks for the help. I am looking at the VTS. This is something new as i haven't done this before. As per notifying the Oracle DB, the developer said he can build an executable that I can invoke thru LR and that should take care of sending the notification to the DB.
In that case I'd suggest a .dll if possible for the executable - easy to call from LR
Which version of LR are you using?
how do I call a .dll in Load runner and I am using LR 11.5
Keep in mind that you are now adding an in test query load which will never be there in production. In nearly all cases where I have seen this occur the queries are not supported by an existing index and this results in large amounts of table scan and disk activity on the server which impact the other queries in the system. I would heartily encourage you to pre-load your data into VTS or simply into a CSV based parameter file prior to the test.
IF you do decide to head down this path be aware that you will not be able to modify an existing parameter file on the fly and have that information available to you during the same test. Why, you may ask? At the beginning of the test all data files are loaded into RAM on the load generators to prevent large amounts of disk based activity during the test execution, as this would distort the performance of the virtual users. As a result any changes to the parameter file will be available at the start of the next test when the updated parameter file is loaded into memory. And, be a realist here, are you comfortable brokering the lock and write access for dozens, perhaps hundreds of virtual users, all trying to update a common data file at the same time? I would daresay that this is a challenge that would hamper most of the users of performance test tools due to weak foundation skills in development.
Look to VTS if you must. Have one scheduled process run to create a file which is then batch loaded into a VTS table. Then pull your parameters from VTS. This will be equally as complicated from a programming perspecive as would be loading a DLL with all of the code support to query the database yourself.
My preference would be for no extra in-test load and pre stage data moving from one stage to the next in data files. This way you get no extra load to the database during the test, you have no extra complications from VTS and you can use all of the standard in-built capabilities for reading from data files on a unique basis for each virtual user.
Replace ineffective offshore contracts, LoadRunnerByTheHour
. Starting @ $19.95/hr USD.
Put us to the test, skilled expertise is less expensive than you might imagine.
Twitter: @LoadRunnerBTH @PerfBytes
Originally Posted by nandivineel