Not sure why, but one can't use variables in Sampler names.

However, one can change the sample result label:

Try the following in a BeanShell Assertion attached as a child of the Sampler:

SampleResult.setSampleLabel(vars.get("VARNAME"));
return true;

[Note that the documentation for the BeanShell Assertion currently
states that Assertions are called from a single thread - this is not
the case, they are called from the same thread as the sampler, and so
have access to the variables. I'm fixing the docs....]

S.
On 6/22/05, Joshua Auerbach <[EMAIL PROTECTED]> wrote:
> Hi all,
> 
> I have a test plan that has one HTTP Request Sampler whose server name
> and Path are generated from beanShell functions that generate the values
> randomly based on weights (these are contained in an init file).  This
> works fine, my problem is that for the purpose of logging the results I
> need to fill in the Name field of the HTTP Request: I want this Name to
> reflect the url that is sampled.  However no matter what I have tried to
> preserve the value generated on that execution I cannot get it to work
> with multiple threads.  I was wondering if anyone has any suggestion for
> me, on how I can do this.  I have tried storing the values in a
> beanShell variable, as Jmeter properties, and several variations on this
> theme and still can not get the functionality I desire all the time.
> 
> Thanks,
> Josh
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to