jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryabtsev Vladimir <v.ryabt...@pflb.ru>
Subject RE: variable within csv
Date Thu, 10 Apr 2014 09:11:03 GMT
Hi, Léon.

1. Do you really need CSV file for your case? I think you can use Interleave Controller or
Random Controller for this, or prepare path in special variable in JSR223 Sampler and then
use it.
2. You can add random period directly in Path field of HTTP Request, for example /new.html?period=${__Random(1,5)}

-----
VR

-----Original Message-----
From: Léon Keijser [mailto:keijser@stone-it.com] 
Sent: Thursday, April 10, 2014 11:43 AM
To: user@jmeter.apache.org
Subject: variable within csv

Hi,

I have a CSV that contains parts of an URI:

/new.html
/part.html
/some.html

In my test I loop over the CSV using variable $SUBPAGE. Now, one part can contain parameters:

/new.html?period=1
/new.html?period=2
etc.

I thought of making the number a random variable (1,2,3,4,5) and including the variable name
in the CSV:

/new.html?period=${RANDNUM}

which would then translate to '?period=1' , '?period=2', etc.

Unfortunately that doesn't work, as jmeter won't fill in the variable. I could remove the
'/new.html' from my original CSV and make a separate request for that, using the RANDNUM variable,
but perhaps there's a better way. Any advice is welcome!

regards,

Léon


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org
Mime
View raw message