0

I am using JMeter UI to load test our web application. I am sending HTTP Requests in the following sequence.

  1. GET request for the login page.
  2. POST request to login to the application.
  3. GET users page after logging into the application.

I am testing with 50 users with a ramp-up period of 10 seconds and the loop count of 1.

Here are the results of the test:

  1. All the 50 GET requests succeeded.
  2. All the 50 POST requests to login failed with the error: `

org.apache.http.NoHttpResponseException: server failed to respond

` 3. 29 GET user requests passed and the remaining (21) failed with the response code 302.

From my understanding, since all the POST requests to login to the application failed, I would expect that all the GET requests to get the users page would also fail. But, some of the GET users requests succeeded.

Can anyone please explain how can this happen?

Note: I am using HTTP cookie manager and HTTP cache manager.

Edit: I have KeepAlive disabled in all of my requests. Also, tried the suggestions from this thread. But, no luck. Also, for 50 virtual users, if i set the ramp-up period as 120 seconds, then all the requests are successful. I notice the problem mentioned above, only when i set the ramp-up period as 10 seconds. When i set the ramp-up period as 60 seconds, the results are as shown below.

  1. All 50 GET login requests succeeded.
  2. 11 POST Login requests succeeded. The remaining (39) failed with the error `

org.apache.http.NoHttpResponseException: server failed to respond

` 3. 13 GET users requests succeeded. The remaining (37) failed with Response code: 302

Community
  • 1
  • 1
sridhar249
  • 4,471
  • 6
  • 26
  • 27
  • 1
    "no response" means nothing came back from the server, but most likely the post DID get there and was processed. just... nothing got sent back. no headers, no body, etc... – Marc B Jul 13 '16 at 16:29
  • @MarcB, is there something i can do to get the response from the server? Or do you think the application is not able to process those many requests at once and not sending the response back? – sridhar249 Jul 13 '16 at 16:32

2 Answers2

0

Clearly, something was able to be completed even though the login had not.

Clearly, a PRIOR login had completed, and that session never terminated: half-baked, but live, credentials were left lying around for the next interloper to inherit.

It didn't WORK, it FAILED! Log users out COMPLETELY when their sessions are seen to have just "gone away" for some reason.

0

Disable KeepAlive. Open the HTTP request sampler , there is a checkbox KeepAlive which is by default selected.

Also, Change "Implementation" of your HTTP Requests to HTTPClient4.

See this thread

Community
  • 1
  • 1
Adnan
  • 2,931
  • 3
  • 23
  • 35
  • I have already disabled KeepAlive in all of my HTTP requests. Also, tried "Implementation" with the default option and also "HTTPClient4". I see the same result. – sridhar249 Jul 13 '16 at 19:11
  • What is the JMeter version? – Adnan Jul 14 '16 at 03:19
  • I am using the latest version 3.0 r1743807 – sridhar249 Jul 14 '16 at 03:20
  • Add the next 2 lines to user.properties file (usually lives under /bin folder of your JMeter installation) `httpclient4.retrycount=1` `hc.parameters.file=hc.parameters` – Adnan Jul 14 '16 at 03:38
  • In hc.parameters file (also lives under JMeter's /bin folder) uncomment the following line: `http.connection.stalecheck$Boolean=true` – Adnan Jul 14 '16 at 03:40
  • Try tweaking these two properties ...This might solve the problem – Adnan Jul 14 '16 at 03:40
  • I have already tried those. Unfortunately, that did not have any effect. I am still seeing the issue even after those modifications. I closed the Jmeter and started it again after those modifications. Still see the error 'org.apache.http.NoHttpResponseException: server failed to respond' – sridhar249 Jul 14 '16 at 03:42
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/117268/discussion-between-sridhar249-and-adnan). – sridhar249 Jul 14 '16 at 03:44