You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Jaw Dat <id...@gmail.com> on 2006/09/08 19:52:38 UTC

Re: how to instruct jMeter to give several values to a POST variable in a test run?

This article is very clear on how to iterate over many users for a given
thread group and its child requests, 
how about iterating over other variables?

Mind you each user would log in once, then perform a number of
activities (send a number of requests) throughout their session (or
thread group)
How do I simulate sending sets of variables with different values ?
Thanks for the link to the article, and hoping for similarly helpful
information .


On Fri, 2006-09-08 at 07:56 +0600, Chamal De Silva wrote:
> Jaw Dat ,
>  
> This article contains details on how to do it.
>  
> http://software.newsforge.com/article.pl?sid=04/02/19/1452218&tid=91&tid=89&tid=150&tid=27&tid=31
>  
> Best Regards,
> Chamal.
>  
> 
> 
>  
> On 9/6/06, Jaw Dat <id...@gmail.com> wrote: 
>         In a given HTTP sampler, How do I instruct JMeter to
>         successively set a
>         POST variable to a set of values , from a list of possible
>         values? 
>         
>         I'll rephrase,
>         
>         How do I instruct JMeter to give many values to an HTTP
>         sampler that
>         posts one variable, in the course of a test-run ?
>         
>         How do I tell jmeter to repeat the request, each time setting
>         the 
>         variable to a value from the list.
>         
>         What are the exact steps? In what format and Where do I make a
>         list of
>         the values to be used for the variable I want to Post in the
>         request.
>         
>         please i need more info than a pointer to the documentation. 
>         
>         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


Re: how to instruct jMeter to give several values to a POSTvariable in a test run?

Posted by sebb <se...@gmail.com>.
Or use a global counter (threads will not share values) or the
threadNum() function to generate a unique variable for each thread.

You can then use the variables to generate unique strings to send.
This depends on how much choice you have over the format of the
values.

Or you can create a CSV file containing the different items you want
to send, and use the CSV DataSet Config to read these into variables.

S.
On 08/09/06, Aycock, Glenn W. (JSC-IS)[TES] <gl...@nasa.gov> wrote:
> One thing you might try, if I understand your question correctly, is to
> add a BeanShell pre-processor to the Sampler and do something like this:
>
> sampler.addArgument("varname1", value1);
> sampler.addArgument("varname2", value2);
> sampler.addArgument("varname3", value3);
> sampler.addArgument("varname4", value4);
>
> If you need to concatenate several values into one variable, do it
> beforehand.
>
> I use this method to dynamically post different variables and values.
>
> Alternatively, you might try adding setting up a User Parameters
> preprocessor and use the variables you define there in the Request
> parameters.
>
> Hope this helps,
> Glenn
>
> -----Original Message-----
> From: Jaw Dat [mailto:idarataljawda@gmail.com]
> Sent: Friday, September 08, 2006 12:53 PM
> To: Chamal De Silva
> Cc: JMeter Users List
> Subject: Re: how to instruct jMeter to give several values to a
> POSTvariable in a test run?
>
> This article is very clear on how to iterate over many users for a given
> thread group and its child requests, how about iterating over other
> variables?
>
> Mind you each user would log in once, then perform a number of
> activities (send a number of requests) throughout their session (or
> thread group) How do I simulate sending sets of variables with different
> values ?
> Thanks for the link to the article, and hoping for similarly helpful
> information .
>
>
> On Fri, 2006-09-08 at 07:56 +0600, Chamal De Silva wrote:
> > Jaw Dat ,
> >
> > This article contains details on how to do it.
> >
> > http://software.newsforge.com/article.pl?sid=04/02/19/1452218&tid=91&t
> > id=89&tid=150&tid=27&tid=31
> >
> > Best Regards,
> > Chamal.
> >
> >
> >
> >
> > On 9/6/06, Jaw Dat <id...@gmail.com> wrote:
> >         In a given HTTP sampler, How do I instruct JMeter to
> >         successively set a
> >         POST variable to a set of values , from a list of possible
> >         values?
> >
> >         I'll rephrase,
> >
> >         How do I instruct JMeter to give many values to an HTTP
> >         sampler that
> >         posts one variable, in the course of a test-run ?
> >
> >         How do I tell jmeter to repeat the request, each time setting
> >         the
> >         variable to a value from the list.
> >
> >         What are the exact steps? In what format and Where do I make a
> >         list of
> >         the values to be used for the variable I want to Post in the
> >         request.
> >
> >         please i need more info than a pointer to the documentation.
> >
> >         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
>
>

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


RE: how to instruct jMeter to give several values to a POSTvariable in a test run?

Posted by "Aycock, Glenn W. (JSC-IS)[TES]" <gl...@nasa.gov>.
One thing you might try, if I understand your question correctly, is to
add a BeanShell pre-processor to the Sampler and do something like this:

sampler.addArgument("varname1", value1); 
sampler.addArgument("varname2", value2); 
sampler.addArgument("varname3", value3); 
sampler.addArgument("varname4", value4); 

If you need to concatenate several values into one variable, do it
beforehand.

I use this method to dynamically post different variables and values.

Alternatively, you might try adding setting up a User Parameters
preprocessor and use the variables you define there in the Request
parameters.

Hope this helps,
Glenn

-----Original Message-----
From: Jaw Dat [mailto:idarataljawda@gmail.com] 
Sent: Friday, September 08, 2006 12:53 PM
To: Chamal De Silva
Cc: JMeter Users List
Subject: Re: how to instruct jMeter to give several values to a
POSTvariable in a test run?

This article is very clear on how to iterate over many users for a given
thread group and its child requests, how about iterating over other
variables?

Mind you each user would log in once, then perform a number of
activities (send a number of requests) throughout their session (or
thread group) How do I simulate sending sets of variables with different
values ?
Thanks for the link to the article, and hoping for similarly helpful
information .


On Fri, 2006-09-08 at 07:56 +0600, Chamal De Silva wrote:
> Jaw Dat ,
>  
> This article contains details on how to do it.
>  
> http://software.newsforge.com/article.pl?sid=04/02/19/1452218&tid=91&t
> id=89&tid=150&tid=27&tid=31
>  
> Best Regards,
> Chamal.
>  
> 
> 
>  
> On 9/6/06, Jaw Dat <id...@gmail.com> wrote: 
>         In a given HTTP sampler, How do I instruct JMeter to
>         successively set a
>         POST variable to a set of values , from a list of possible
>         values? 
>         
>         I'll rephrase,
>         
>         How do I instruct JMeter to give many values to an HTTP
>         sampler that
>         posts one variable, in the course of a test-run ?
>         
>         How do I tell jmeter to repeat the request, each time setting
>         the 
>         variable to a value from the list.
>         
>         What are the exact steps? In what format and Where do I make a
>         list of
>         the values to be used for the variable I want to Post in the
>         request.
>         
>         please i need more info than a pointer to the documentation. 
>         
>         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