Re: Concurrent Connections

Gary Mulder <[email protected]> Tue, 25 Nov 2014 20:18:13 +0000
Newsgroups gmane.comp.java.grinder.user
Message-ID <CAKy9zTDMOpNU=3+3Tac0A9L2-G1tDgEt2rJJAPyUcQ_wK=vDfw@mail.gmail.com>
On 25 November 2014 at 19:46, Zulu Zulu <[email protected]> wrote:

> Hi,
>
> When I captured the requests of my web app using TCPProxy, for some pages
> there was a bunch of requests for resource files along with other requests.
> In a real browser, these requests for resource files will be downloaded
> concurrently. But the recorded scripts sends these scripts serially one by
> one. Is it possible to instruct Grinder to make some of these requests
> concurrently just like a real browser?
>

Short answer: Not out of the box.

You're going to have to simulate concurrency using multiple threads, just
as the browser does to eliminate the serial nature of the playback.

You can reasonably assume that if you have enough threads all playing back
the same recording in multiple different sessions there will be concurrent
requests for the resources, but across multiple sessions rather than within
a single session. This is not perfectly realistic, but probably will be
good enough for most testing purposes.

If you really need the same session to generate concurrent requests then it
is a bit more complex. You'll likely need to split the recording into
concurrent sub-recordings that can be executed across concurrent Grinder
threads using something like
http://grinder.sourceforge.net/g3/script-gallery.html#parallel.py. Any
shared state (i.e. the session id) will need to be passed to all the
Grinder threads that are running the sub-recordings.

Hope that helps,
Gary

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk

_______________________________________________
grinder-use mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/grinder-use