You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Gaël LHEZ <gl...@glowria.fr> on 2006/05/15 10:49:39 UTC

Setting up some data before running the test (TestListener?)

Hello

Still working on jmeter, I'm making a plugin which add up some new
functions, so that I can inject parameter in URL (such as foo.php?x=145).
Those parameters come from a database, and that's here my problem lies : 

I'd like to set up an object that would listen for test start and test end
(equivalent of setUp() and tearDown() in Junit). After reading the source of
jMeter, I found the interface TestListener, and tried to implements it, but
it does nothing.

What I'm looking for, is something that would warn me once that the test
started (and not one time per thread, etc).

Thanks,
LHEZ Gael



Note: If someone have answers to this : 
http://mail-archives.apache.org/mod_mbox/jakarta-jmeter-user/200605.mbox/aja
x/%3c20060511102447.018EB1297B2@servermail.glowgroup.com%3e


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


RE: RE (2) : Setting up some data before running the test (TestListener?)

Posted by Gaël LHEZ <gl...@glowria.fr>.
Thanks :)



-----Message d'origine-----
De : sebb [mailto:sebbaz@gmail.com] 
Envoyé : jeudi 18 mai 2006 19:48
À : JMeter Users List
Objet : Re: RE (2) : Setting up some data before running the test
(TestListener?)

Try implementing NoThreadClone
On 18/05/06, Gaël LHEZ <gl...@glowria.fr> wrote:
> Hey,
>
> I would like to know why my TestElement is created more than one time? 
> (I suppose it pass the element to each tree node?)
>
> Is there a way to avoid that? (after all, i want my element to be 
> unique, even if it works well with TestListener, meaning it call 
> testStarted()) once.
>
> Gael
>
>
> ---------------------------------------------------------------------
> 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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.6.1/343 - Release Date: 18/05/2006
 


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


Re: RE (2) : Setting up some data before running the test (TestListener?)

Posted by sebb <se...@gmail.com>.
Try implementing NoThreadClone
On 18/05/06, Gaël LHEZ <gl...@glowria.fr> wrote:
> Hey,
>
> I would like to know why my TestElement is created more than one time? (I
> suppose it pass the element to each tree node?)
>
> Is there a way to avoid that? (after all, i want my element to be unique,
> even if it works well with TestListener, meaning it call testStarted())
> once.
>
> Gael
>
>
> ---------------------------------------------------------------------
> 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 (2) : Setting up some data before running the test (TestListener?)

Posted by Gaël LHEZ <gl...@glowria.fr>.
Hey,

I would like to know why my TestElement is created more than one time? (I
suppose it pass the element to each tree node?) 

Is there a way to avoid that? (after all, i want my element to be unique,
even if it works well with TestListener, meaning it call testStarted())
once.

Gael 


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


RE: Setting up some data before running the test (TestListener?)

Posted by Gaël LHEZ <gl...@glowria.fr>.
 
> You have to add it a jar file in lib/ext, start JMeter and then add the
Gui to the test plan.

Still about logging, I'd like to know how I could log my action? I create
logger using LoggingManager, but no way to activate them (so each time I log
something, it is not shown)

> The testStarted() methods are called as the thread starts.

Well nice thing finally :) I can add some variable (via Jspinner,
SpinnerNumberModel, etc) to prepare the test.



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.6.0/341 - Release Date: 16/05/2006
 


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


Re: Setting up some data before running the test (TestListener?)

Posted by sebb <se...@gmail.com>.
On 16/05/06, Gaël LHEZ <gl...@glowria.fr> wrote:
>
>
> -----Message d'origine-----
> De : sebb [mailto:sebbaz@gmail.com]
> Envoyé : lundi 15 mai 2006 21:19
> À : JMeter Users List
> Objet : Re: Setting up some data before running the test (TestListener?)
>
> On 15/05/06, Gaël LHEZ <gl...@glowria.fr> wrote:
> >> Hello
> >>
> >> Still working on jmeter, I'm making a plugin which add up some new
> >> functions, so that I can inject parameter in URL (such as foo.php?x=145).
> >> Those parameters come from a database, and that's here my problem lies :
> >>
> >> I'd like to set up an object that would listen for test start and test
> >> end (equivalent of setUp() and tearDown() in Junit). After reading the
> >> source of jMeter, I found the interface TestListener, and tried to
> >> implements it, but it does nothing.
>
> >It does work.
>
> Hum, but how it is loaded into jMeter? My TestListener is not called while
> it should propose a confirm dialog, log something (using LoggingManager),
> and even print into the stdout output stream ('syso') ?

You have to add it a jar file in lib/ext, start JMeter and then add
the Gui to the test plan.

> >> What I'm looking for, is something that would warn me once that the
> >> test started (and not one time per thread, etc).
>
> >The TestListener has the appropriate methods: testStarted() and
> testStarted(host)
>
> >I suggest you look at some existing code that implements TestListener, e.g.
> Summariser.
>
> It has a gui component, so I understand it is added as listener, but if I do
> such gui component, how can I ensure that my data is set up before that any
> thread group runs ? (I suppose it should be before any thread group in gui
> tree? Right?)

The testStarted() methods are called as the thread starts.

> > Thanks,
> > LHEZ Gael
>
>
> ---------------------------------------------------------------------
> 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: Setting up some data before running the test (TestListener?)

Posted by Gaël LHEZ <gl...@glowria.fr>.
 

-----Message d'origine-----
De : sebb [mailto:sebbaz@gmail.com] 
Envoyé : lundi 15 mai 2006 21:19
À : JMeter Users List
Objet : Re: Setting up some data before running the test (TestListener?)

On 15/05/06, Gaël LHEZ <gl...@glowria.fr> wrote:
>> Hello
>>
>> Still working on jmeter, I'm making a plugin which add up some new 
>> functions, so that I can inject parameter in URL (such as foo.php?x=145).
>> Those parameters come from a database, and that's here my problem lies :
>>
>> I'd like to set up an object that would listen for test start and test 
>> end (equivalent of setUp() and tearDown() in Junit). After reading the 
>> source of jMeter, I found the interface TestListener, and tried to 
>> implements it, but it does nothing.

>It does work.

Hum, but how it is loaded into jMeter? My TestListener is not called while
it should propose a confirm dialog, log something (using LoggingManager),
and even print into the stdout output stream ('syso') ? 

>> What I'm looking for, is something that would warn me once that the 
>> test started (and not one time per thread, etc).

>The TestListener has the appropriate methods: testStarted() and
testStarted(host)

>I suggest you look at some existing code that implements TestListener, e.g.
Summariser.

It has a gui component, so I understand it is added as listener, but if I do
such gui component, how can I ensure that my data is set up before that any
thread group runs ? (I suppose it should be before any thread group in gui
tree? Right?)

> Thanks,
> LHEZ Gael


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


Re: Setting up some data before running the test (TestListener?)

Posted by sebb <se...@gmail.com>.
On 15/05/06, Gaël LHEZ <gl...@glowria.fr> wrote:
> Hello
>
> Still working on jmeter, I'm making a plugin which add up some new
> functions, so that I can inject parameter in URL (such as foo.php?x=145).
> Those parameters come from a database, and that's here my problem lies :
>
> I'd like to set up an object that would listen for test start and test end
> (equivalent of setUp() and tearDown() in Junit). After reading the source of
> jMeter, I found the interface TestListener, and tried to implements it, but
> it does nothing.

It does work.

> What I'm looking for, is something that would warn me once that the test
> started (and not one time per thread, etc).

The TestListener has the appropriate methods:
testStarted() and testStarted(host)

I suggest you look at some existing code that implements TestListener,
e.g. Summariser.

> Thanks,
> LHEZ Gael
>
>
>
> Note: If someone have answers to this :
> http://mail-archives.apache.org/mod_mbox/jakarta-jmeter-user/200605.mbox/aja
> x/%3c20060511102447.018EB1297B2@servermail.glowgroup.com%3e
>
>
> ---------------------------------------------------------------------
> 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