You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Raffaele Viola <ra...@gmail.com> on 2006/04/10 15:00:47 UTC

sum of 2variable

Hi, all

Can I, in my test plan, sum the value of 2 variable and puth it in a 3rd?
For example:
     a=2;
     b=3;
     c=a+b;

Thanks, Raffo

Re: sum of 2variable

Posted by Raffaele Viola <ra...@gmail.com>.
OK it seems to work :-)!!!

Thanks again!!!!
-Raffo

On 4/10/06, sebb <se...@gmail.com> wrote:
>
> If -(5) does not work and -5 does that should give you a clue as to
> how to solve the problem.
>
> You can put function calls anywhere that you can put a variable reference.
>
> S.
> On 10/04/06, Raffaele Viola <ra...@gmail.com> wrote:
> > It doesn't work :-(
> >
> > Where can I put this besides a "Response assertion" ?
> >
> > -Raffo
> >
> > On 4/10/06, sebb <se...@gmail.com> wrote:
> > >
> > > What does
> > >
> > > ${__intSum(${nb_aft},-(5),nb_aft2)}
> > >
> > > do?
> > >
> > > On 10/04/06, Raffaele Viola <ra...@gmail.com> wrote:
> > > > I've tried,
> > > >
> > > > ${__intSum(${nb_aft},-5,nb_aft2)} works
> > > > ${__intSum(${nb_aft},-(${nb_aft1}),nb_aft2)}  doesn't works
> > > >
> > > > What can I do?
> > > >
> > > > Regards
> > > > -Raffo
> > > >
> > > > On 4/10/06, sebb <se...@gmail.com> wrote:
> > > > >
> > > > > Did that not work?
> > > > >
> > > > > I'd try something llike ${__intSum(23,-17,var)} first and then
> replace
> > > > > the constants with variables.
> > > > >
> > > > > S.
> > > > > On 10/04/06, Raffaele Viola <ra...@gmail.com> wrote:
> > > > > > Ok therefore
> > > > > > nb_aft =nb_be4 - nb_count
> > > > > >
> > > > > > becomes
> > > > > >
> > > > > > ${__intSum(${nb_be4},(-${nb_count}),nb_aft)} ?
> > > > > >
> > > > > > Thanks
> > > > > > Raffo
> > > > > >
> > > > > > On 4/10/06, sebb <se...@gmail.com> wrote:
> > > > > > >
> > > > > > > c=a-b=a+(-b)
> > > > > > >
> > > > > > > S.
> > > > > > > On 10/04/06, Raffaele Viola <ra...@gmail.com> wrote:
> > > > > > > > The quetions is also for the subtraction :
> > > > > > > > How can I do c=a-b ?
> > > > > > > >
> > > > > > > > Thanks a lot
> > > > > > > > -Raffo
> > > > > > > >
> > > > > > > > On 4/10/06, Raffaele Viola <ra...@gmail.com> wrote:
> > > > > > > > >
> > > > > > > > > Hi, all
> > > > > > > > >
> > > > > > > > > Can I, in my test plan, sum the value of 2 variable and
> puth
> > > it in
> > > > > a
> > > > > > > 3rd?
> > > > > > > > > For example:
> > > > > > > > >      a=2;
> > > > > > > > >      b=3;
> > > > > > > > >      c=a+b;
> > > > > > > > >
> > > > > > > > > Thanks, Raffo
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > 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
> > >
> > >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: sum of 2variable

Posted by sebb <se...@gmail.com>.
If -(5) does not work and -5 does that should give you a clue as to
how to solve the problem.

You can put function calls anywhere that you can put a variable reference.

S.
On 10/04/06, Raffaele Viola <ra...@gmail.com> wrote:
> It doesn't work :-(
>
> Where can I put this besides a "Response assertion" ?
>
> -Raffo
>
> On 4/10/06, sebb <se...@gmail.com> wrote:
> >
> > What does
> >
> > ${__intSum(${nb_aft},-(5),nb_aft2)}
> >
> > do?
> >
> > On 10/04/06, Raffaele Viola <ra...@gmail.com> wrote:
> > > I've tried,
> > >
> > > ${__intSum(${nb_aft},-5,nb_aft2)} works
> > > ${__intSum(${nb_aft},-(${nb_aft1}),nb_aft2)}  doesn't works
> > >
> > > What can I do?
> > >
> > > Regards
> > > -Raffo
> > >
> > > On 4/10/06, sebb <se...@gmail.com> wrote:
> > > >
> > > > Did that not work?
> > > >
> > > > I'd try something llike ${__intSum(23,-17,var)} first and then replace
> > > > the constants with variables.
> > > >
> > > > S.
> > > > On 10/04/06, Raffaele Viola <ra...@gmail.com> wrote:
> > > > > Ok therefore
> > > > > nb_aft =nb_be4 - nb_count
> > > > >
> > > > > becomes
> > > > >
> > > > > ${__intSum(${nb_be4},(-${nb_count}),nb_aft)} ?
> > > > >
> > > > > Thanks
> > > > > Raffo
> > > > >
> > > > > On 4/10/06, sebb <se...@gmail.com> wrote:
> > > > > >
> > > > > > c=a-b=a+(-b)
> > > > > >
> > > > > > S.
> > > > > > On 10/04/06, Raffaele Viola <ra...@gmail.com> wrote:
> > > > > > > The quetions is also for the subtraction :
> > > > > > > How can I do c=a-b ?
> > > > > > >
> > > > > > > Thanks a lot
> > > > > > > -Raffo
> > > > > > >
> > > > > > > On 4/10/06, Raffaele Viola <ra...@gmail.com> wrote:
> > > > > > > >
> > > > > > > > Hi, all
> > > > > > > >
> > > > > > > > Can I, in my test plan, sum the value of 2 variable and puth
> > it in
> > > > a
> > > > > > 3rd?
> > > > > > > > For example:
> > > > > > > >      a=2;
> > > > > > > >      b=3;
> > > > > > > >      c=a+b;
> > > > > > > >
> > > > > > > > Thanks, Raffo
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > 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
> >
> >
>
>

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


Re: sum of 2variable

Posted by Raffaele Viola <ra...@gmail.com>.
It doesn't work :-(

Where can I put this besides a "Response assertion" ?

-Raffo

On 4/10/06, sebb <se...@gmail.com> wrote:
>
> What does
>
> ${__intSum(${nb_aft},-(5),nb_aft2)}
>
> do?
>
> On 10/04/06, Raffaele Viola <ra...@gmail.com> wrote:
> > I've tried,
> >
> > ${__intSum(${nb_aft},-5,nb_aft2)} works
> > ${__intSum(${nb_aft},-(${nb_aft1}),nb_aft2)}  doesn't works
> >
> > What can I do?
> >
> > Regards
> > -Raffo
> >
> > On 4/10/06, sebb <se...@gmail.com> wrote:
> > >
> > > Did that not work?
> > >
> > > I'd try something llike ${__intSum(23,-17,var)} first and then replace
> > > the constants with variables.
> > >
> > > S.
> > > On 10/04/06, Raffaele Viola <ra...@gmail.com> wrote:
> > > > Ok therefore
> > > > nb_aft =nb_be4 - nb_count
> > > >
> > > > becomes
> > > >
> > > > ${__intSum(${nb_be4},(-${nb_count}),nb_aft)} ?
> > > >
> > > > Thanks
> > > > Raffo
> > > >
> > > > On 4/10/06, sebb <se...@gmail.com> wrote:
> > > > >
> > > > > c=a-b=a+(-b)
> > > > >
> > > > > S.
> > > > > On 10/04/06, Raffaele Viola <ra...@gmail.com> wrote:
> > > > > > The quetions is also for the subtraction :
> > > > > > How can I do c=a-b ?
> > > > > >
> > > > > > Thanks a lot
> > > > > > -Raffo
> > > > > >
> > > > > > On 4/10/06, Raffaele Viola <ra...@gmail.com> wrote:
> > > > > > >
> > > > > > > Hi, all
> > > > > > >
> > > > > > > Can I, in my test plan, sum the value of 2 variable and puth
> it in
> > > a
> > > > > 3rd?
> > > > > > > For example:
> > > > > > >      a=2;
> > > > > > >      b=3;
> > > > > > >      c=a+b;
> > > > > > >
> > > > > > > Thanks, Raffo
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > 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: sum of 2variable

Posted by sebb <se...@gmail.com>.
What does

${__intSum(${nb_aft},-(5),nb_aft2)}

do?

On 10/04/06, Raffaele Viola <ra...@gmail.com> wrote:
> I've tried,
>
> ${__intSum(${nb_aft},-5,nb_aft2)} works
> ${__intSum(${nb_aft},-(${nb_aft1}),nb_aft2)}  doesn't works
>
> What can I do?
>
> Regards
> -Raffo
>
> On 4/10/06, sebb <se...@gmail.com> wrote:
> >
> > Did that not work?
> >
> > I'd try something llike ${__intSum(23,-17,var)} first and then replace
> > the constants with variables.
> >
> > S.
> > On 10/04/06, Raffaele Viola <ra...@gmail.com> wrote:
> > > Ok therefore
> > > nb_aft =nb_be4 - nb_count
> > >
> > > becomes
> > >
> > > ${__intSum(${nb_be4},(-${nb_count}),nb_aft)} ?
> > >
> > > Thanks
> > > Raffo
> > >
> > > On 4/10/06, sebb <se...@gmail.com> wrote:
> > > >
> > > > c=a-b=a+(-b)
> > > >
> > > > S.
> > > > On 10/04/06, Raffaele Viola <ra...@gmail.com> wrote:
> > > > > The quetions is also for the subtraction :
> > > > > How can I do c=a-b ?
> > > > >
> > > > > Thanks a lot
> > > > > -Raffo
> > > > >
> > > > > On 4/10/06, Raffaele Viola <ra...@gmail.com> wrote:
> > > > > >
> > > > > > Hi, all
> > > > > >
> > > > > > Can I, in my test plan, sum the value of 2 variable and puth it in
> > a
> > > > 3rd?
> > > > > > For example:
> > > > > >      a=2;
> > > > > >      b=3;
> > > > > >      c=a+b;
> > > > > >
> > > > > > Thanks, Raffo
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > 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: sum of 2variable

Posted by Raffaele Viola <ra...@gmail.com>.
I've tried,

${__intSum(${nb_aft},-5,nb_aft2)} works
${__intSum(${nb_aft},-(${nb_aft1}),nb_aft2)}  doesn't works

What can I do?

Regards
-Raffo

On 4/10/06, sebb <se...@gmail.com> wrote:
>
> Did that not work?
>
> I'd try something llike ${__intSum(23,-17,var)} first and then replace
> the constants with variables.
>
> S.
> On 10/04/06, Raffaele Viola <ra...@gmail.com> wrote:
> > Ok therefore
> > nb_aft =nb_be4 - nb_count
> >
> > becomes
> >
> > ${__intSum(${nb_be4},(-${nb_count}),nb_aft)} ?
> >
> > Thanks
> > Raffo
> >
> > On 4/10/06, sebb <se...@gmail.com> wrote:
> > >
> > > c=a-b=a+(-b)
> > >
> > > S.
> > > On 10/04/06, Raffaele Viola <ra...@gmail.com> wrote:
> > > > The quetions is also for the subtraction :
> > > > How can I do c=a-b ?
> > > >
> > > > Thanks a lot
> > > > -Raffo
> > > >
> > > > On 4/10/06, Raffaele Viola <ra...@gmail.com> wrote:
> > > > >
> > > > > Hi, all
> > > > >
> > > > > Can I, in my test plan, sum the value of 2 variable and puth it in
> a
> > > 3rd?
> > > > > For example:
> > > > >      a=2;
> > > > >      b=3;
> > > > >      c=a+b;
> > > > >
> > > > > Thanks, Raffo
> > > > >
> > > > >
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > 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: sum of 2variable

Posted by sebb <se...@gmail.com>.
Did that not work?

I'd try something llike ${__intSum(23,-17,var)} first and then replace
the constants with variables.

S.
On 10/04/06, Raffaele Viola <ra...@gmail.com> wrote:
> Ok therefore
> nb_aft =nb_be4 - nb_count
>
> becomes
>
> ${__intSum(${nb_be4},(-${nb_count}),nb_aft)} ?
>
> Thanks
> Raffo
>
> On 4/10/06, sebb <se...@gmail.com> wrote:
> >
> > c=a-b=a+(-b)
> >
> > S.
> > On 10/04/06, Raffaele Viola <ra...@gmail.com> wrote:
> > > The quetions is also for the subtraction :
> > > How can I do c=a-b ?
> > >
> > > Thanks a lot
> > > -Raffo
> > >
> > > On 4/10/06, Raffaele Viola <ra...@gmail.com> wrote:
> > > >
> > > > Hi, all
> > > >
> > > > Can I, in my test plan, sum the value of 2 variable and puth it in a
> > 3rd?
> > > > For example:
> > > >      a=2;
> > > >      b=3;
> > > >      c=a+b;
> > > >
> > > > Thanks, Raffo
> > > >
> > > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > 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: sum of 2variable

Posted by Raffaele Viola <ra...@gmail.com>.
Ok therefore
nb_aft =nb_be4 - nb_count

becomes

${__intSum(${nb_be4},(-${nb_count}),nb_aft)} ?

Thanks
Raffo

On 4/10/06, sebb <se...@gmail.com> wrote:
>
> c=a-b=a+(-b)
>
> S.
> On 10/04/06, Raffaele Viola <ra...@gmail.com> wrote:
> > The quetions is also for the subtraction :
> > How can I do c=a-b ?
> >
> > Thanks a lot
> > -Raffo
> >
> > On 4/10/06, Raffaele Viola <ra...@gmail.com> wrote:
> > >
> > > Hi, all
> > >
> > > Can I, in my test plan, sum the value of 2 variable and puth it in a
> 3rd?
> > > For example:
> > >      a=2;
> > >      b=3;
> > >      c=a+b;
> > >
> > > Thanks, Raffo
> > >
> > >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: sum of 2variable

Posted by sebb <se...@gmail.com>.
c=a-b=a+(-b)

S.
On 10/04/06, Raffaele Viola <ra...@gmail.com> wrote:
> The quetions is also for the subtraction :
> How can I do c=a-b ?
>
> Thanks a lot
> -Raffo
>
> On 4/10/06, Raffaele Viola <ra...@gmail.com> wrote:
> >
> > Hi, all
> >
> > Can I, in my test plan, sum the value of 2 variable and puth it in a 3rd?
> > For example:
> >      a=2;
> >      b=3;
> >      c=a+b;
> >
> > Thanks, Raffo
> >
> >
>
>

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


Re: sum of 2variable

Posted by Raffaele Viola <ra...@gmail.com>.
The quetions is also for the subtraction :
How can I do c=a-b ?

Thanks a lot
-Raffo

On 4/10/06, Raffaele Viola <ra...@gmail.com> wrote:
>
> Hi, all
>
> Can I, in my test plan, sum the value of 2 variable and puth it in a 3rd?
> For example:
>      a=2;
>      b=3;
>      c=a+b;
>
> Thanks, Raffo
>
>

Re: sum of 2variable

Posted by sebb <se...@gmail.com>.
Read the manual - functions

On 10/04/06, Raffaele Viola <ra...@gmail.com> wrote:
> Hi, all
>
> Can I, in my test plan, sum the value of 2 variable and puth it in a 3rd?
> For example:
>     a=2;
>     b=3;
>     c=a+b;
>
> Thanks, Raffo
>
>

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