You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Geoff Meakin <ge...@gamesys.co.uk> on 2008/07/21 16:32:34 UTC

Can JMeter be used with XML datastreams over sockets?

Hi all,

I am interested in a variety of loadtesting products to loadtest the
following specific example:

A user (client) connects to a TCP socket and constantly reads an XML
stream from it.
When a certain XML message is found: e.g. "<FOO/>", the user then
requests a normal HTTP webpage.

I need to ramp this scenario up to 10000s of users. 

"XML-event based spikes" i guess you could call it. 

Is there anything in or associated with JMeter that could help me with
this? I have looked across the site already and found for example TCP
controllers and Beanshell controllers, but it seems that everybody with
examples or usage of these have used them with a request-response model
(i.e. open a socket send some data, receive some data), rather than a
read-request (eventbased) model such as i describe (i.e. constantly read
the xml stream in the background and fire off some http requests if
<FOO/> is read....)

I just wondered if anybody could point me in the right direction or is
JMeter not really the thing to use here?

Thanks
-Geoff


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


Re: Can JMeter be used with XML datastreams over sockets?

Posted by sebb <se...@gmail.com>.
On 21/07/2008, Geoff Meakin <ge...@gamesys.co.uk> wrote:
> Hi all,
>
>  I am interested in a variety of loadtesting products to loadtest the
>  following specific example:
>
>  A user (client) connects to a TCP socket and constantly reads an XML
>  stream from it.
>  When a certain XML message is found: e.g. "<FOO/>", the user then
>  requests a normal HTTP webpage.
>
>  I need to ramp this scenario up to 10000s of users.
>
>  "XML-event based spikes" i guess you could call it.
>
>  Is there anything in or associated with JMeter that could help me with
>  this? I have looked across the site already and found for example TCP
>  controllers and Beanshell controllers, but it seems that everybody with
>  examples or usage of these have used them with a request-response model
>  (i.e. open a socket send some data, receive some data), rather than a
>  read-request (eventbased) model such as i describe (i.e. constantly read
>  the xml stream in the background and fire off some http requests if
>  <FOO/> is read....)
>
>  I just wondered if anybody could point me in the right direction or is
>  JMeter not really the thing to use here?

As you have seen, JMeter is based on request-response samplers.

However, the BeanShell integration offers the flexibility to extend JMeter.
Or of course you can write your own sampler (or any other element) from scratch.

In this case, the easiest might be to use a BeanShell Sampler (or
Pre-Processor if you are not interested in the time taken) to read
from the socket.
Or amend the existing TCPClientImpl class to create your own version
that does not send anything and only exits when it sees FOO.

Then use the normal HTTP sampler.

I'm assuming here that the XML socket is not used for the HTTP request.


>  Thanks
>  -Geoff
>
>
>  ---------------------------------------------------------------------
>  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