1

I have a series of requests I need to send to a server.
E.g.

Http-Request-1  
Http-Request-2  
Http-Request-3  
Http-Request-4  
Http-Request-5  
Http-Request-6  
Http-Request-7  

I need to verify that these requests have been processed in e.g. 4 seconds.
I mean JMeter will start sending the first request and the server responds and the sends the second request and the server responds etc and then JMeter sends the last request and the server sends back the last response but overall this flow must not take more than 4 seconds to complete. I mean from the time JMeter sends the first request to the time it receives the last response.
If it takes 6 seconds I need the test to fail.
I am not sure how to simulate this best.
Should I put all my HTTP request samples under a Simple Contoller and add this as a child to a Runtime Contoller with Runtime=4?
Example:

Runtime Controller (Runtime=4)  
|-       Simple Controller  
             |-Http-Request-1  
             |-Http-Request-2  
             |-Http-Request-3  
             |-Http-Request-4  
             |-Http-Request-5  
             |-Http-Request-6  
             |-Http-Request-7  

Or should I somehow use the Transaction Controller along with Assertion Listener?
Are these equivalent? What would be the best way for this, taking into account I need also a report of the result?

Cratylus
  • 52,998
  • 69
  • 209
  • 339

1 Answers1

1

Use a Transaction Controller, see example:

enter image description here

And Duration Assertion: enter image description here

But be sure if you are simulating a webapp to add Timers to simulate user pause time.

In my example I didn't put any for simplification. Also note that if these reqests are the result of Ajax Call, then JMeter will not simulate the parallelism of these requests but execute them sequentially which can impact response time.

Community
  • 1
  • 1
UBIK LOAD PACK
  • 33,980
  • 5
  • 71
  • 116
  • But what is the difference if I used a Rutime controller and added 4 seconds as runtime? – Cratylus Nov 23 '12 at 21:36
  • RuntimeController will execute the samplers inside it for the time specified, so if they take less than 4s , Http-Request1 will be executed twice ,... Finally controller will not report the time it takes – UBIK LOAD PACK Nov 23 '12 at 22:31