You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Jose Castro <ok...@gmail.com> on 2008/09/03 23:10:05 UTC
increment counter
I am trying to create a variable with a value and the increment that
value manually
I tried both
1. create a counter with a starting value
2. create the variable in the user parameters
i created a beanshell sampler and use this code
${__intSum(${iptv_counter},1,${iptv_counter})}
${__logn(VAR2=${iptv_counter},OUT)}
${__intSum(${iptv_counter},1,${iptv_counter})}
${__logn(VAR2=${iptv_counter},OUT)}
${__intSum(${iptv_counter},1,${iptv_counter})}
${__logn(VAR2=${iptv_counter},OUT)}
I also tried
${__counter(FALSE,${iptv_counter})}
expecting it will take the original value and increment one.
I also tried
${__javaScript(${iptv_counter} = ${iptv_counter} +1)}
Nothing work
How can I increment the value of a variable by one??
Thank you
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: increment counter
Posted by Jose Castro <ok...@gmail.com>.
Thank you. That worked
On Wed, Sep 3, 2008 at 5:41 PM, sebb <se...@gmail.com> wrote:
> On 03/09/2008, Jose Castro <ok...@gmail.com> wrote:
>> I am trying to create a variable with a value and the increment that
>> value manually
>>
>>
>> I tried both
>> 1. create a counter with a starting value
>> 2. create the variable in the user parameters
>>
>> i created a beanshell sampler and use this code
>> ${__intSum(${iptv_counter},1,${iptv_counter})}
>
> Try:
>
> ${__intSum(${iptv_counter},1,iptv_counter)}
>
> the last parameter is the variable name - not the value.
>
>> ${__logn(VAR2=${iptv_counter},OUT)}
>> ${__intSum(${iptv_counter},1,${iptv_counter})}
>> ${__logn(VAR2=${iptv_counter},OUT)}
>> ${__intSum(${iptv_counter},1,${iptv_counter})}
>> ${__logn(VAR2=${iptv_counter},OUT)}
>>
>> I also tried
>> ${__counter(FALSE,${iptv_counter})}
>> expecting it will take the original value and increment one.
>>
>> I also tried
>> ${__javaScript(${iptv_counter} = ${iptv_counter} +1)}
>>
>>
>> Nothing work
>>
>> How can I increment the value of a variable by one??
>>
>> Thank you
>>
>> ---------------------------------------------------------------------
>> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: increment counter
Posted by sebb <se...@gmail.com>.
On 03/09/2008, Jose Castro <ok...@gmail.com> wrote:
> I am trying to create a variable with a value and the increment that
> value manually
>
>
> I tried both
> 1. create a counter with a starting value
> 2. create the variable in the user parameters
>
> i created a beanshell sampler and use this code
> ${__intSum(${iptv_counter},1,${iptv_counter})}
Try:
${__intSum(${iptv_counter},1,iptv_counter)}
the last parameter is the variable name - not the value.
> ${__logn(VAR2=${iptv_counter},OUT)}
> ${__intSum(${iptv_counter},1,${iptv_counter})}
> ${__logn(VAR2=${iptv_counter},OUT)}
> ${__intSum(${iptv_counter},1,${iptv_counter})}
> ${__logn(VAR2=${iptv_counter},OUT)}
>
> I also tried
> ${__counter(FALSE,${iptv_counter})}
> expecting it will take the original value and increment one.
>
> I also tried
> ${__javaScript(${iptv_counter} = ${iptv_counter} +1)}
>
>
> Nothing work
>
> How can I increment the value of a variable by one??
>
> Thank you
>
> ---------------------------------------------------------------------
> 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