How to Add Users While Building a Web Test Plan Using JMeter?
You can create multiple users and send requests to as many pages while working with JMeter. For example, if you would like to create five users sending requests to two pages twice, the total HTTP requests would be 20. You may require elements like Thread Group, Graph Results, etc. to create the test plan.
- Add a Thread Group: Thread Group is a key element in informing JMeter about the number of users, the frequency of requests, and the number of requests.
1. Select Add->ThreadGroup.
2. Right-click to get the Add menu.
3. Select the test plan.
4. Expand the Test Plan tree to see the added ThreadGroup element.
5. Modify the default properties by selecting the ThreadGroup element, as shown below.
6. Leave the Ramp-up property that tells about the delay between starting each user, which is 1 second by default.
7. Increase the number of threads (users) to 5.
8. You can provide any relevant name for the ThreadGroup.
9. If the Ramp-up value is 5, JMeter will finish starting users by the end of 5 seconds. However, the value 0 will immediately start all users.
10. In the Loop Count field, enter 2. It is the number of times you would like to repeat the test. Selecting ‘Forever’ would repeatedly run the test plan.
11. Unlike other applications, the control panel of JMeter automatically accepts the changes that have been made.
12. In case of any changes, the updated tree would reflect after you leave the Control Panel, as shown below.
You might also like: Basics of JMeter and Troubleshooting