How to Build a Web Test Plan in Apache JMeter?
Apache JMeter helps in testing the performance of a webpage by creating test plans. You can follow the below mentioned steps to do so.
- Open JMeter. The window will appear somewhat like this.
- In the Name textbox, enter the name of the test plan. For example, you can enter ‘Sample Test’ as the name of the test plan.
In order to get the name reflected, change the focus to Workbench node->Test Plan node.
- Add the Thread Group element to configure the number of users to simulate. You can use the context menu to add all the node elements.
- Add a child element node by right-clicking the element.
- Add an appropriate option.
- Right-click Test Plan->Add->Threads->Thread Group.
- Type ‘Users’ in the Name field, as shown below.
- Right-click the Thread group and open the context menu. Choose Add->Sampler->HTTP request to add HTTP request sampler.
- Configure the empty HTTP request sampler. You can configure the following elements.
- Server Name or IP
- Right-click the Thread Group to open the context menu. Select Add->Listener->View Results Tree option.
- From the menu, select Run and then select Start to execute the test plan.
You can save the test plan before starting the test. This helps in running the test multiple times.
- Green color against Home page indicates success
- JMeter stores the data sent by web server
- Sampler Results store the data sent by web server
- The Request tab shows the data sent to web server
- The Response data tab shows the data in text format
You may also like: Basics of JMeter and Troubleshooting