Setup with JMeter
Note
Since JMeter is a Java program, access to a database is done using the JDBC protocol.
The first thing to do is put the JDBC driver in the JMeter classpath if that has not already been done.
The two simplest solutions to this are:
- Dropping the .jar driver file in JMETER_HOME/lib/
- Using the user.classpath property to reference the driver JAR
Once this is done, you must configure the connection to the database with the JDBC Connection Configuration element.
This will allow us to configure the connection string for our database (including the URL, port, connection ID, password, and so on):
v
Figure 9.5: JDBC connection configuration
This element is composed of four parts, named as follows:
- Variable Name Bound to Pool: This name will further be used in JDBC Requests.
- Connection Pool Configuration.
- Connection Validation by Pool.
- Database Connection Configuration.
The property names are very self-explanatory, so we will not dwell any...