Massas wrote:
> 
> 
> Massas wrote:
>> 
>> 
>> sebb-2-2 wrote:
>>> 
>>> On 31/03/2009, Massas <mus...@hotmail.com> wrote:
>>>>
>>>>  Hello all!
>>>>
>>>>  I'm having problems with a created java sampler. It works like a charm
>>>> with
>>>>  two input parameters passed on from counters in jMeter as long as i
>>>> run in
>>>>  multiple threads. However, if i run loops the input parameters seem to
>>>> be
>>>>  reset, which is my problem.
>>>>
>>>>  Thread 1, loop 1, variable=1
>>>>  Thread 2, loop 1, variable=2
>>>>  Thread 1, loop 2, variable=1 (should it to be 3)
>>>>  Thread 2, loop 2, variable=2 (and 4 here etc.)
>>>>
>>>>  The weird thing is that the variable is used in HTTP-samplers as well,
>>>> where
>>>>  i can see that it actually increments as it should, but the java
>>>> sampler
>>>>  doesn't seem to care about that...
>>> 
>>> Are you saying that the increment does not work in the Java Request
>>> Sampler provided with JMeter?
>>> 
>>> If so, please open a Bugzilla issue and attach the simplest possible
>>> test plan which shows the problem.
>>> 
>>> Or does it work with that, and not your sampler?
>>> 
>>>>  Anyone have any hints on what I'm doing wrong?
>>> 
>>> If it's only your sampler that does not work, then compare your code
>>> with the JMeter Java Request sampler.
>>> 
>>>>  Thanks in advance
>>>>
>>>>
>>>>
>>>>  --
>>>>  View this message in context:
>>>> http://www.nabble.com/JavaSampler-not-incrementing-input-variables-tp22803561p22803561.html
>>>>  Sent from the JMeter - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>>  ---------------------------------------------------------------------
>>>>  To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
>>>>  For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org
>>>>
>>>>
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
>>> For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org
>>> 
>>> 
>>> 
>> 
>> 
>> I had a feeling that i was way to unspecific when i posted this message,
>> sorry about that.
>> 
>> It is my own java sampler (that extends AbstractJavaSamplerClient) that
>> 'remembers' the first loops initial values, and ignore the following
>> loops input variables. 
>> I will look in to jMeters sampler and do some more digging 
>> Thanks for the answer!
>> 
>> Regards, Massas
>> 
> 
> Hi Again.
> 
> I still can't manage to get my sampler to use the incremented variable
> over loops. Since I'm not very good at java, I'll try to steal some time
> from a developer later this week, but if anyone has a hint until then, I'd
> be grateful.
> 
> My sampler uses quite a lot from the sleeptest, should I consider adding
> something to the teardownTest perhaps? Today it's just a nice little
> ripoff:
> 
>     public void teardownTest(JavaSamplerContext context) {
>         getLogger().debug(whoAmI() + "\tteardownTest()");
>         listParameters(context);
>     } 
> 
> 

I've noticed that the teardownTest() is only beeing called after all loops
are finished, so putting stuff here is pretty useless.

So rephrasing the question again then: 
Why isn't teardownTest() called after each loop?

Regards, Mats
-- 
View this message in context: 
http://www.nabble.com/JavaSampler-not-incrementing-input-variables-tp22803561p22863998.html
Sent from the JMeter - User mailing list archive at Nabble.com.


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

Reply via email to