jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Lloyd <oliver_ll...@hotmail.com>
Subject Re: Long polling http request
Date Wed, 23 Jan 2013 16:51:12 GMT
I think that with long polling the connection is closed once a response is received and a new
request made straight after so you actually don't need to keep the original request open -
you want to end it.

It's really not so hard to do this in JMeter - just setup a thread to call the endpoint and
let it do what it does by default when making a standard HTTP request. The way JMeter loops
by default will give you what you need to simulate long polling - all the clever stuff is
server side, not client.

Just setup a simple thread group with this one call in it and nothing else. Put your other
logic in a different group.

On 23 Jan 2013, at 16:12, sebb <sebbaz@gmail.com> wrote:

> On 23 January 2013 16:03, Jono <jonomacd@gmail.com> wrote:
>> 
>> It is not web sockets it is simply a long held http request.
>> The method described
>> in the link would not work for me.  I need to act on the incoming data
>> without dropping the connection.  Essentially I need to
>> move on from the HTTP sampler to the next sampler but
>> continue to hold the original http connection
>> open and listen for the next incoming message.
>> 
>> I do not want to close the HTTP request to validate the
>> response data or move on to other test steps.  I
>> expect more data to come down the from that HTTP
>> request separated by new lines.
>> 
>> I can't wait until all the data comes down as I have to act on it
>> immediately.
> 
> In that case I think you will need to write your own sampler, as the
> HTTP Samplers are not designed to return until the response is
> complete.
> 
> You might be able to hack a solution using the
> 
> http://jmeter.apache.org/usermanual/component_reference.html#TCP_Sampler
> 
> Or you could perhaps extend one of the HTTP Samplers.
> 
>> Thanks
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>> For additional commands, e-mail: user-help@jmeter.apache.org
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
> 
> 


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


Mime
View raw message