You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Oleg Olenin <ol...@intersystems.com> on 2010/06/09 13:35:44 UTC
Simultaneous execution of several HTTP requests
Hi,
I need to simulate in test the behavior of N browsers, every of them sends several concurrent (parallel) HTTP requests to HTTP server.
Every request from the same browser is processed in scope of the same HTTP session, so all these parallel requests have the same cookie with session id. So this test simulates the concurrent HTTP requests in scope of same sessions from many users:
thread group, users
http cookie manager
http request (session start)
http request 1
http request 2 (runs simultaneously with http request 1)
http request (session end)
How could I do parallel execution of HTTP requests with JMeter?
Thank you,
Regards,
Oleg Olenin
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Simultaneous execution of several HTTP requests
Posted by Oleg Olenin <ol...@intersystems.com>.
Thank you very much,
I've got an idea and will try.
Regards,
Oleg Olenin
On Jun 9, 2010, at 9:04 PM, Deepak Shetty wrote:
This isnt easy to do. If your application supports URL rewriting(sending
sessionids in URL) then you may be able to do this or else you will have to
interact with cookie manager.
Something like below
Thread Group (even number if threads for your case, Odd numbered threads
will execute request1 and even numbered threads will execute request2 , so
you are simulating 10 browsers then 20 threads - assuming 2 requests run in
parallel)
+If odd numbered thread then
++http request create session
+++Extract session id
+++BSH listener setup session id in JMeter Properties using say thread
number as the key and session id as value (Properties are shared across
threads)
+Simple Controller
++Test Action
+++Synchronizing timer (wait for everyone to have setup their sessions)
+If odd numbered thread
++Http Request1
+++BSH which adds session id to request , read from corresponding property
using thread numbers in JMeter Properties
+If even numbered thread
++Http Request2
+++BSH which adds session id to request , read from corresponding property
using thread numbers in JMeter Properties
+Simple Controller
++Test Action
+++Synchronizing timer (wait for everyone to have setup their sessions)
+If odd numbered thread then
++http request end session
Please note I havent tried this so you may run into some issues. You could
also have variations where you split this into thread groups where the
creating of sessions is a separate thread group (which writes all ids to
file ) and then the next thread group picks this up ..
regards
deepak
On Wed, Jun 9, 2010 at 4:35 AM, Oleg Olenin <ol...@intersystems.com>wrote:
> Hi,
>
> I need to simulate in test the behavior of N browsers, every of them sends
> several concurrent (parallel) HTTP requests to HTTP server.
> Every request from the same browser is processed in scope of the same HTTP
> session, so all these parallel requests have the same cookie with session
> id. So this test simulates the concurrent HTTP requests in scope of same
> sessions from many users:
>
> thread group, users
> http cookie manager
> http request (session start)
> http request 1
> http request 2 (runs simultaneously with http request 1)
> http request (session end)
>
>
> How could I do parallel execution of HTTP requests with JMeter?
>
> Thank you,
>
>
> Regards,
> Oleg Olenin
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Simultaneous execution of several HTTP requests
Posted by Deepak Shetty <sh...@gmail.com>.
This isnt easy to do. If your application supports URL rewriting(sending
sessionids in URL) then you may be able to do this or else you will have to
interact with cookie manager.
Something like below
Thread Group (even number if threads for your case, Odd numbered threads
will execute request1 and even numbered threads will execute request2 , so
you are simulating 10 browsers then 20 threads - assuming 2 requests run in
parallel)
+If odd numbered thread then
++http request create session
+++Extract session id
+++BSH listener setup session id in JMeter Properties using say thread
number as the key and session id as value (Properties are shared across
threads)
+Simple Controller
++Test Action
+++Synchronizing timer (wait for everyone to have setup their sessions)
+If odd numbered thread
++Http Request1
+++BSH which adds session id to request , read from corresponding property
using thread numbers in JMeter Properties
+If even numbered thread
++Http Request2
+++BSH which adds session id to request , read from corresponding property
using thread numbers in JMeter Properties
+Simple Controller
++Test Action
+++Synchronizing timer (wait for everyone to have setup their sessions)
+If odd numbered thread then
++http request end session
Please note I havent tried this so you may run into some issues. You could
also have variations where you split this into thread groups where the
creating of sessions is a separate thread group (which writes all ids to
file ) and then the next thread group picks this up ..
regards
deepak
On Wed, Jun 9, 2010 at 4:35 AM, Oleg Olenin <ol...@intersystems.com>wrote:
> Hi,
>
> I need to simulate in test the behavior of N browsers, every of them sends
> several concurrent (parallel) HTTP requests to HTTP server.
> Every request from the same browser is processed in scope of the same HTTP
> session, so all these parallel requests have the same cookie with session
> id. So this test simulates the concurrent HTTP requests in scope of same
> sessions from many users:
>
> thread group, users
> http cookie manager
> http request (session start)
> http request 1
> http request 2 (runs simultaneously with http request 1)
> http request (session end)
>
>
> How could I do parallel execution of HTTP requests with JMeter?
>
> Thank you,
>
>
> Regards,
> Oleg Olenin
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>