You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by pb...@gmx.net on 2007/09/27 23:14:39 UTC

Custom protocol: How to share a connection object bewteen multiple iterations

Hi,

I'm currently evaluating if we can use JMeter for our project. It seems to be almost a perfect match for the way we plan to test our system.

The only difference is that we use a custom binary protocol. The protocol is simple in a sense that it allows to connect to a server, create items, read, update, and delete them.

I've already added a custom sampler class that connects to our server and creates an item each iteration. 

I would like to reuse the connection object for multiple iterations, because in a typical scenario a client would connect once, create a couple of items, read some, and disconnect once it is done.

I would have to create the connection object before the first iteration (i.e. loop) of a thread and close it after the last iteration. What would a good way of doing this?

I thought about maybe adding a custom thread group object that knows about our protocol, creates the connection and hands it to each sampler thread, but I'm still hoping that there might be a more generic way to do this, without me having to modify core parts of JMeter (I'd rather add stuff, than modify code).

Any suggestions/directions are appreciated.

Thanks,
Rico.
-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail

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


Re: Custom protocol: How to share a connection object bewteen multiple iterations

Posted by sebb <se...@gmail.com>.
You can probably use the TestListener or ThreadListener interface.

On 27/09/2007, pbm-rico@gmx.net <pb...@gmx.net> wrote:
> Hi,
>
> I'm currently evaluating if we can use JMeter for our project. It seems to be almost a perfect match for the way we plan to test our system.
>
> The only difference is that we use a custom binary protocol. The protocol is simple in a sense that it allows to connect to a server, create items, read, update, and delete them.
>
> I've already added a custom sampler class that connects to our server and creates an item each iteration.
>
> I would like to reuse the connection object for multiple iterations, because in a typical scenario a client would connect once, create a couple of items, read some, and disconnect once it is done.
>
> I would have to create the connection object before the first iteration (i.e. loop) of a thread and close it after the last iteration. What would a good way of doing this?
>
> I thought about maybe adding a custom thread group object that knows about our protocol, creates the connection and hands it to each sampler thread, but I'm still hoping that there might be a more generic way to do this, without me having to modify core parts of JMeter (I'd rather add stuff, than modify code).
>
> Any suggestions/directions are appreciated.
>
> Thanks,
> Rico.
> --
> GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
> Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>
>

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