Site icon Tutorial

Adding JDBC Requests

Adding JDBC Requests

Adding JDBC Requests- Now that we have defined our users, it is time to define the tasks that they will be performing. In this section, you will specify the JDBC requests to perform.

Begin by selecting the JDBC Users element. Click your right mouse button to get the w Add menu, and then select Add –> Config Element –> JDBC Connection Configuration. Then, select this new element to view its Control Panel (see Figure 7.3).

Set up the following fields (these assume we will be using a MySQL database called ‘cloud’):

The other fields on the screen can be left as the defaults.

JMeter creates a database connection pool with the configuration settings as specified in the Control Panel. The pool is referred to in JDBC Requests in the ‘Variable Name’ field. Several different JDBC Configuration elements can be used, but they must have unique names. Every JDBC Request must refer to a JDBC Configuration pool. More than one JDBC Request can refer to the same pool.

Selecting the JDBC Users element again. Click your right mouse button to get the Add menu, and then select Add –> Sampler –> JDBC Request . Then, select this new element to view its Control Panel.

In our Test Plan, we will make two JDBC requests. The first one is for select all ‘Running’ VM instances, and the second is to select ‘Expunging’ VM instances (obviously you should change these to examples appropriate for your particular database). These are illustrated below.

JMeter sends requests in the order that you add them to the tree.

Next, add the second JDBC Request and edit the following properties:

Test Your Software Testing Skills By Taking Our JMeter Practice Tests On This Link

Apply For JMeter Certification

Go back to Tutorial

Exit mobile version