jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karel Vervaeke <>
Subject Re: load test PUT requests with variables in request body
Date Mon, 18 Aug 2008 14:31:50 GMT
For future reference: it seems to work smoothly.
It took most of my time to figure out I needed to download the bsh jar
file to $JMETER_HOME/lib.

For ${discriminator} I used ${__threadNum}.
The PUT request uses /tmp/requestbody-${__threadNum}.

Currently the beanshell script is executed once for every thread
iteration so the file gets regenerated every time.  It is not really
necessary (and probably causing a lot of overhead), but it could
probably use a variable to generate the file only once for every thread.


On Mon, 2008-08-18 at 15:13 +0200, Karel Vervaeke wrote:
> Hi, I am writing a load test for an application and I need to send
> PUT requests where the request body contains variable data.
> I have a (theoretical) strategy for solving it, but I would like to know
> if there are better ways to do it.
> My current strategy is like this:
> ThreadGroup
>   + BeanShell script to create /tmp/requestbody-${discriminator}.xml
>   + Sampler PUT /testme/123 => PUTs the 
>   + BeanShell script to clean up /tmp/requestbody-${discriminator}.xml
> The ${discriminator} variable should be unique per thread so that each
> thread can read/write to its own file.
> Do you think this is a valid approach or am I going to hit some walls?
> Is there another (better) approach?
> Regards,
> Karel
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message