JMeter for database load testing

151 views Asked by At

I'm trying to use Apache JMeter to perform a database load test using a list of pre-generated SQL statements from a file. The pre-generated SQL statements are various stored procedures that were captured from a trace so they have the needed values for the parameters as part of the execution statement.

I'm following the same design as a load test for an HTTP Request from an external file by setting the variable from the CSV_Data_Set_Config as the PATH value of the HTTP Request but replacing the HTTP Request with the JDBC Request and putting the variable from the CSV_Data_Set_Config for the SQL statement. Each example I've seen only takes the contents of the file as variables into a predefined SQL statement but nothing takes each line from the file as a complete statement to execute.

In addition to using the CSV_Data_Set_Config I've tried going another route by trying to read lines from the file using the CSVRead function and putting the statement in the parameter values of the JDBC Request and using the ? to fill in the SQL Statement at runtime however it seems to cut off the line after the first period in the three part name. For example a line would be exec {database}.{owner}.{procedure} and the request would only send in exec {database}

Can you use JMeter in this manner with the JDBC Request controller?

0

There are 0 answers