| How-to retrieve parameter data from MySQL database |
|
|
|
| Written by TnT Admin | ||||
| Monday, 21 April 2008 23:37 | ||||
Page 1 of 2 As you’ve know, LoadRunner offers the feature of retrieving parameter data from database with the Database Query Wizard in Vugen. This allows ease and alternative preparation of your parameter data for load test. By putting a little creativity on this feature, we need not limit ourselves to the example of Microsoft Access database as mentioned in it’s Vugen User Guide, we can extend this feature to other types of database, say, MySQL database!
Let’s go through a technical overview of what you need to do for it to work!
Now, let’s go through the details here with some screenshots to make it easier to understand.
[1] Download driver
I’ve obtained my MySQL-ODBC driver from MySQL website. You will need to find out what is the driver required to connect your database accordingly.
[2] Get the database connection string
In the context of MySQL database, I referred to ConnectionStrings. The string that I used was for 3.51 driver and I was trying out on a localhost MySQL which will looked like the below
Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=myDatabase; User=root;Password=rootpassword;Option=3;
Of course, you can refer to other type of connection string in ConnectionStrings.com as well! If you have tried out with other database, please let us know and we can compile them into a single source of reference point!
[3] Get the SQL statement
The SQL statement that I used was show status, which actually queries the status of MySQL database. Take note, I’m just using it for example purposes, you can use conventional statements like SELECT field FROM table. [4] Create a new parameter using Database Query Wizard
In the script and create a new parameter using Database Query Wizard (Open Parameter list > New > Data Wizard > Select “Specify SQL statement manually” > click “Next”)
|
||||
| Last Updated ( Wednesday, 12 November 2008 20:33 ) |






