JMeter Database Test Plan
In this section, you will learn how to create a basic test plan to test a database server.
For our test purpose we will create a database using MySQL workbench. You can use any other database server as per your convenience. You can also refer our MySQL database tutorial https://www.javatpoint.com/mysql-tutorial to learn more about database creation.
Once you have a database server on your system. Follow these steps:
The following image shows the database with their records which we have created using MySQL work bench.
Note: You need to copy the appropriate JDBC driver to "lib" directory of apache-jmeter-4.0 folder. For example, the following image shows the respective .jar files in the C:\JMeter\apache-jmeter-4.0\lib folder.
Create JMeter Test Plan
Adding JDBC requests
You need to set up some important fields which will determine the proper connection between your database and JMeter. These fields include -
You need to set up some important fields. The JDBC request control panel includes -
The following image shows the default View Results Tree interface.
Save and Execute Test Plan
Verify the Output
Green colour against the name JMeter indicates successful execution of the Test Plan.
The Response data tab shows the records of database "javatpoint".