On 03/04/2008, Grzegorz Kończyk <[EMAIL PROTECTED]> wrote:
> Thanks for a quick reply.
>
>
> > Looks like the threads don't run in parallel, so why not just use a
> > single thread with a function that returns the next bid?
>
>
> They will run in parallel, they should at least.
>
Yes, they do, but the ramp up is so long that each thread will finish
before the next starts.
>
> > Or you can use a file containing the bid values, and read the values
> > for each sample.
>
>
> I was thinking about that, but I'd like to do this with Beanshell function,
> which I think, should be more suitable and more pro ;)
>
>
> > In the real application, do the users place bids without seeing what
> > others have bid?
> > Or do they browse to a page, look at the current price, and bid >
> >accordingly?
>
>
> I want threads (users) to bid accordingly - next thread have to know what bid
> was placed by previous one and have to overbid his offer.
>
So the test plan needs to load the bidding page, extract the previous
bid value and then rebid with the new value.
>
> > > 2. When should I fill Parameters field?
> > Only if you want to pass in parameters.
>
>
> So do I have to put ${bidValue} in that field, or it's not necessary to have
> this value accessible in the Script filed?
Do you want to access the bid value as a parameter?
>
> Meantime I was trying to do something like this in BeanShell PostProcessor:
> (I don't pass any parameters to the Benshell PostProcessor element -
> Parameters field is empty)
>
>
> int nextValue = ${bidValue}; //nextValue = 1000
> nextValue = nextValue - 5; // nextValue = 995
> //now I'd like to save nextValue into bidValue - how can I do that? When I
> try:
>
> vars.put( bidValue, Integer.toString(nextValue) );
>
>
> The result in jmeter.log is:
>
>
> ERROR - jmeter.util.BeanShellInterpreter: Error invoking bsh method: eval
> Sourced file: inline evaluation of: ``int nextValue = 1000; nextValue =
> nextValue - 5; vars.put( bidValue, Integer.to . . . '' : Undefined argument:
> bidValue
>
>
> The same error I receive when I use this ass the 3rd line:
>
> setProperty( bidValue, Integer.toString(nextValue) );
>
Exactly, read the error message: bidValue is not defined.
The parameters to the methods are (String, String).
You need to pass a string containing the variable name.
Java strings look like ... "value".
>
> GK
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>