Apache Jmeter
Apache Jmeter is java application designed to load test the application. You can use Jmeter to test how much load your Web site can handle.
Steps to test the load testing:
- First step to create THREAD GROUP, it tells JMeter the number of users you want to simulate, how often the users should send requests, and the how many requests they should send.
Test Plan --> Add --> Thread Group
Elements of the thread group:
Name: Start by providing a more descriptive name for our Thread Group.
Number of threads: Increase the number of users (called threads) incremental way.
Ramp-Up Period : This property tells JMeter how long to delay between starting each user like it thread is 5 and ramp up time is 2 sec, then the delay between starting users would be 1 second (5s / 2 = 2.5 user per second)
Loup Count: This property tells JMeter how many times to repeat your test.
- Adding Default HTTP Request Properties, In this section, you will specify the default settings for your HTTP requests.
Thread Group --> Add --> Config Element --> HTTP Request Defaults.
Name: Set a appropritate name to the HTTP request.
Web Server's Server Name/IP: all HTTP requests will be sent to the same Web server jakarta.apache.org. Enter this domain name into the field.
Path: You can put the URL of the page, on which you want to make hit.
- Adding Cookie Support, This will ensure that each thread gets its own cookies, but shared across all HTTP Request objects.
Thread Group --> Add --> Config Element --> HTTP Cookie Manager
- Adding HTTP Requests, In our Test Plan, we need to make two HTTP requests. The first one is for the Jakarta home page like (http://jakarta.apache.org/), and the second one is for the Project Guidelines page (http://jakarta.apache.org/site/guidelines.html).
Thread Group --> Add --> Sampler --> HTTP Request
Select the HTTP Request element in the tree and edit the following properties (see Figure 5.5):
- Change the Name field to "Home Page".
- Set the Path field to "/". Remember that you do not have to set the Server Name field because you already specified this value in the HTTP Request Defaults element.And
Next, add the second HTTP Request and edit the following properties - Change the Name field to "Project Guidelines".
- Set the Path field to "/site/guidelines.html".
- Adding a Listener to View Store the Test Results, The final element you need to add to your Test Plan is a Listener . This element is responsible for storing all of the results of your HTTP requests in a file and presenting a visual model of the data.
Thread Group --> Add --> Listener --> Graph Results
No comments:
Post a Comment