The first step in every jmeter test plan is to add a thread group component. The thread group tells jmeter the number of users you want to simulate, how long the user sends the request, and how many requests they should send.
Add a thread group component. Select the test plan, right-click the component, select Add from the shortcut menu, and select Add --> thread group.
Now you should see that the thread group is under the test plan. If you do not see this component, click test plan component to expand the test plan tree.
Next, you need to modify the default attributes. select the thread group component in the tree (if you have not selected it ). now you should see the thread group control panel in the right column of the jmeter window (see Figure 7.1 below ).
Figure 7.1. Default thread group |
Give our thread group A descriptive name. In the Name field, enter JDBC users.
In this example, the database is mydb and the table name is stocks. |
Next, increase the number of users to 10.
In the next field, the ramp-up period is left as the default value 0 s. this attribute tells jmeter how long the delay is when every user is started. for example, if you enter a ramp-up period of 5 seconds, jmeter starts all users before the end of 5th seconds. therefore, if we have five users with a 5-second ramp-up period, the startup latency between each user is 1 second (5 users/5 seconds = 1 user/second ). if you set this value to 0, jmeter immediately starts all users.
Enter a value 3 in the number of cycles field. This attribute tells jmeter how many times you have repeated tests. Let jmeter keep running your test plan and select the "always" check box.
In most applications, You have to manually accept the changes you make in the control panel. however, in jmeter, after you make the changes, the control panel will automatically accept your changes. if you change the component name, the tree will update the component name to a new one after you leave the Control Panel (for example, after selecting another tree component) |
See Figure 7.2. view the JDBC users thread group after completion.
Figure 7.2. JDBC users thread group |