In this tutorial, we will be studying the creation of a Database Test Plan in JMeter. We will see the different test plan elements required for creating the test script along with their usage and configurations.
The following pre-requisites are mandatory for performance testing of a database server-
The steps required to be performed for load testing a database server are-
First of all, we will add a Thread Group to the Test Plan and name it. Then we can configure the Thread Group with required values of Number of Threads, Ramp-up time, loops and other scheduler configurations.
The Config Element- "JDBC Connection Configuration" is required to be added as child of the Thread Group. The properties in "Connection Pool Configuration" and "Connection Validation by Pool" can be kept with default values. Appropriate values for the following parameters need to be configured in "Database Connection Configuration" section-
The Sampler- JDBC Request needs to be added as child of the Thread Group below the JDBC Connection Configuration. Here we can select the type of SQL query form the "Query Type" dropdown and place the SQL query in the "Query" text field.
In order to store and analyze the test results, we can add different types of listeners studied in our tutorial - Listners in JMeter.
Once the whole test script creation and configuration is done, we will run the test by clicking the play icon or pressing Ctrl+r on keyboard. During the test execution, we will monitor the database server in parallel and once the test gets over, we can store and analyze the test results.