jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Schroder <...@manilla.com>
Subject Re: Changing a a variable's value
Date Wed, 08 Dec 2010 17:55:55 GMT
Got it.  Thanks, Sebb.  It also seems that the post-processors only work if placed after sampler,
which seems strange because there's nothing from the sampler's response that needs to be acted
upon.  In any event, thanks for clearing up my confusion on the matter!




On 12/7/10 4:42 PM, "sebb" <sebbaz@gmail.com> wrote:

On 8 December 2010 00:29, Rob Schroder <rob@manilla.com> wrote:
> If I understand you correctly, you're saying I simply want to do the following?:
>
> vars.put(${mailer_account_id_not_found},"false");
>

No, ${mailer_account_id_not_found} returns the value of the variable
mailer_account_id_not_found.

If V is a variable name, ${V} returns its value.

To set variable V:

vars.put("V","value");

>
>
>
> On 12/7/10 4:20 PM, "sebb" <sebbaz@gmail.com> wrote:
>
> On 7 December 2010 22:01, Rob Schroder <rob@manilla.com> wrote:
>> To add some specifics to this, I have the following:
>>
>> The While Controller has the following in its "condition" field: ${mailer_account_id_not_found}
>
> Which returns _value_ of the variable "mailer_account_id_not_found"
>
>> In the While Controller loop, I have a BeanShell PostProcessor that contains the
following script:
>> vars.get("${mailer_account_id_not_found}");
>
> Which uses the _value_ of the variable "mailer_account_id_not_found"
> as the name of another variable - probably not what you want.
>
>> vars.put("${mailer_account_id_not_found}","false");
>
> Ditto.
>
>> Shouldn't this set ${mailer_account_id_not_found} to "false"?
>
> Yes, it does. But you want to set the variable
> mailer_account_id_not_found false, not the variable whose name is the
> value.
>
>
>>
>>
>>
>> On 12/7/10 1:45 PM, "Manilla" <rob@manilla.com> wrote:
>>
>> Hi,
>>
>> Apologies for this naïve question, but I've been having an issue with changing the
vale of a variable in a While Controller.  The variable I have in the condition field is ${Value}.
 What's the best mechanism for changing the value of ${Value} to "false"?  I've tried using
post processors, but I can't verify that it's being passed.  Am I doing something stupid?
 Is there an obvious way to do this?
>>
>> Thanks...Rob
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
>

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



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message