How to Check HTTP Request - A Complete Guide

Check HTTP Request

Jmeter is used for any kind of Performance testing, We can use it for a database checking, API testing etc. Here, We can discuss how to check HTTP requests Using Jmeter. We start from the basics. 

 

When you open the Apache JMeter in your MAC pc with the use of the terminal. It opens the screen like below displaying.

 

Test Plan:  Is like a Container, Which will contain all your test elements, that you need to perform this test. Whether its a request or a graph or results or any kind of listeners, all will come into the Test plan. If you want your element to be saved, do not use a workbench, Use Test plan as it can be saved for later use.
 

Performance Testing

Workbench: A place where you can keep your elements for a temporary basis.

Workbench

If you want your element to be saved, do not use a workbench. Now, We add Thread Group in Test Plan.

 

Thread Group: Thread Group is the users that will be used to create & run this test.

Thread Group

Thread Properties: 

  • Number of Threads (Users): Number of Users that you will use to test.
  • Ramp-Up Period (in seconds):  As we are checking the performance of the page HTTP request or 500 users hitting in after every 1 seconds. That particular time to load users is called Ramp-Up Period.
  • Loop Count: If you didn’t select forever checkbox loop moves the no.of times mentioned in Loop count textbox.
    • Forever: Means your loop move continuously this test.
    • Scheduler: For scheduling your Test for some particular time 

To Add an HTTP request you have to right click on Thread Group & Go to Add > Sampler > HTTP Request.

  • HTTP Request: Is used for a Performance testing of web application. You can add any no. of an HTTP request to check. Also, we can rename our HTTP request by any Identical name.

As per the below-attached screenshot Where HTTP request name is set to “Addweb Solution”.

Server name or IP is the web application on which you want to check HTTP request. In Path, we can add path after the IP preceding the backward slash (/). In Protocol we add that either the site is with http:// or https://

HTTP Request

Now, this is the time that we think what's next and how to run this. For that, we have to add one new test environment called listeners. Listeners are the results & reports and Jmeter provides us so many reports to check the results.

 

To Add Listener right click on Thread group > Add > Listener > View Results in Table, you can also use Thread group > Add > Listener > View Results Tree. By using listeners we can check the result & get the report that whether the request of the particular users are failed or not.

Thread group

Click on Green play icon to run the test or you can right click on Thread & click on Start also, you can Click on “Run” from menu & select Start.

Green Play

Check result status in “View Results in Table” the result is already executed.

View Results
  • Sample #: Indicates the Id of no. of user requests.
  • Start Time: Shows the test execution time.
  • Thread Name: Indicates the Name of the Thread Group.
  • Label: Shows the HTTP request name.
  • Sample Time(ms): This is the time that this webpage took to. Approx it takes 1.5 sec to execute the request. This time shows in milliseconds & we converted it to seconds.
  • Status: It shows the request status which is passed or failed. Here the status is green which means we received status code 200.

There are many reasons to Failed the request. A request can be failed due to the network issue or response issues.

  • Latency: Indicates time to the first byte.As soon as the request start getting the bytes that time is recorded over here as latency.

Check result status in “View Results in Table” the result is already executed.

Latency

Here you can see the response code data, request details & Response data.

 

Now, we follow the same process & check by adding no. of users in particular time period.
Like, go to thread group & change the no.of users by 100,150,200 likewise & add the different time period accordingly.


In below-attached screenshots, we are checking the performance of the page HTTP request or 500 users hitting in after every 1 seconds.
 

response code data
HTTP request
HTTP request

Hope this blog helps you to make you more clear about the HTTP request. Feel free to share your queries OR any feedback for the same and need more assistance regarding Web Development Service then contact us now.