You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Olek <li...@olek.dhs.org> on 2004/04/12 17:32:40 UTC

function _StringFromFile, second parameter usage question

Hi

May somebody shed some light on how to use second parameter for
_StringFromFile function?

What I want is to have each thread read serial number from the file, store
it permanently in variable, and than use it for many iterations.

It looks like second parameter fits the bill:-
"Variable Name   A reference name - refName - for reusing the value
created by this function. Stored values are of the form ${refName}."

But somehow it is not working for me, I guess I have messed up something.

Here is how I define a "serial" variable in my User Parameters section:
${_StringFromFile(/export/home/olek/jmeter/serials.txt, serialPerm)}

Than in the HttpSampler I am using variable ${serialPerm}, and it is not being substituted
with value at the time of execution:
http://skeeter3:1103/test.jsp?serialNumber=${serialPerm}

If I use instead ${serial} variable, everything is all right, but it is getting a new
serial number for every iteration and I am trying to avoid it.

Any idea? Maybe I am doing something totally wrong?

BTW - I am already on jmeter 2.0.0, if that makes any difference.


regards,
   Olek


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org