On 6/8/05, Joshua Auerbach <[EMAIL PROTECTED]> wrote:
> Hi, I am new to JMeter, and have spent a good deal of time over the past
> few days getting used to it.  Currently I am trying to create a test
> plan to have HTTP Requests to several pages such that each request is to
> a different page randomly based on a weight.  I know I could do this
> using the Throughput Controller, but there are so many possibilities
> that it is not feasible to create individual HTTP Request nodes for each
> page.  With The Grinder I could do this by setting
> 
> grinder.plugin.parameter.stringBean=URLSelectorStringBean  and then
> grinder.test0.parameter.url=.../<getURL>
> 
> where getURL is a function in the Java Class URLSelectorStringBean that
> returns a random string of the page name from my list of pages based on
> a weighting schema.
> 
> Any suggestions about how to accomplish this easily with JMeter would be
> greatly appreciated.
> 

There was a similar request a month or so - worth checking the
archives for weighted random etc.


Possibilities:

Switch Controller with a weighted random number (e.g. use BeanShell to
create this).
- needs one sampler per page.

Or you could fake a Tomcat Access log with the appropriate URLs and
use the Access Log Sampler (assuming they all have the same host).

We run tests with many thousands of randomised parameters. For this we
use the StringFromFile function, reading from pre-created files
containing the desired variables.
[Some of the values represent tokens that can only be used once per run.]
The values can be read directly in the sampler, or in a User
Parameters Pre-Processor.

Or you could use a BeanShell function to generate a random number and
return a suitable URL from your list.

If there aren't too many different URLs, the Switch Controller has the
advantage that you can give each a different name and thus generate
aggregate statistics.

Not sure what label the Access Log Sampler creates.

S.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to