You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Ravindra Gupta <ra...@gmail.com> on 2006/11/14 18:27:29 UTC

logical problem- how to do it using jmeter?

Hi all,

I am having problem in the following scenario:

Loop controller(n)
     xxx.jsp(post method)
     yyy.jsp(Post method)

Suppose I have to submit a=100 in xxx.jsp page. now for yyy.jsp a should be 90.
When new cycle of the loop controller starts:
a=80 should be submitted for xxx.jsp then,
a=70 for yyy.jsp and so on...

How it could be done using Jmeter?

Thanks in advance,
Ravindra

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


Re: logical problem- how to do it using jmeter?

Posted by sebb <se...@gmail.com>.
One possible solution.

Use a counter to count down from 100, step 20:

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Counter

Use the function

http://jakarta.apache.org/jmeter/usermanual/functions.html#__intSum

to add -10 to the count.


On 14/11/06, Ravindra Gupta <ra...@gmail.com> wrote:
> Hi all,
>
> I am having problem in the following scenario:
>
> Loop controller(n)
>     xxx.jsp(post method)
>     yyy.jsp(Post method)
>
> Suppose I have to submit a=100 in xxx.jsp page. now for yyy.jsp a should be 90.
> When new cycle of the loop controller starts:
> a=80 should be submitted for xxx.jsp then,
> a=70 for yyy.jsp and so on...
>
> How it could be done using Jmeter?
>
> Thanks in advance,
> Ravindra
>
> ---------------------------------------------------------------------
> 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: logical problem- how to do it using jmeter?

Posted by Sk...@londen-insurance.com.



You could use the BeanShell Preprocessor to accomplish this.  First, add a
'User Defined Variables' (under Config Elements) element to your Thread
Group.  Add a variable named 'A' to it, with a value of 100.  Add the
BeanShell Preprocessor as a child of your HTTP Sampler, and in it, put
something like the following:

a = vars.get("A");
newa = Integer.parseInt( a ) - 10;
vars.put( "A", newa + "" ) //must convert newa back to a string

Then, in your HTTP Sampler, use the following for the path:

/xxx.jsp?a=${A}

This will use the new A value with each iteration.

Hope this helps,

Skyler Bingham
skyler.bingham@londen-insurance.com
(602) 957-1650 x1139

"Ravindra Gupta" <ra...@gmail.com> wrote on 11/14/2006 10:27:29 AM:

> Hi all,
>
> I am having problem in the following scenario:
>
> Loop controller(n)
>      xxx.jsp(post method)
>      yyy.jsp(Post method)
>
> Suppose I have to submit a=100 in xxx.jsp page. now for yyy.jsp a
> should be 90.
> When new cycle of the loop controller starts:
> a=80 should be submitted for xxx.jsp then,
> a=70 for yyy.jsp and so on...
>
> How it could be done using Jmeter?
>
> Thanks in advance,
> Ravindra
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>

This e-mail and files transmitted with it are confidential, and are
intended solely for the use of the individual or entity to whom this e-mail
is addressed.  If you are not the intended recipient, or the employee or
agent responsible to deliver it to the intended recipient, you are hereby
notified that any dissemination, distribution or copying of this
communication is strictly prohibited.  If you are not one of the named
recipient(s) or otherwise have reason to believe that you received this
message in error, please immediately notify security@londen-insurance.com
 by e-mail, and destroy the original message.  Thank You.


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