You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Mikko Ohtamaa <mi...@ardites.com> on 2006/08/03 14:58:44 UTC

Extending Jmeter for highly asynchronous protocol

Hi,

I am planning to do some load testing over SIP (Session Initation) protocol.
SIP is highly asynchronous protocol. After opening SIP pipe, you never know
what kind of messages arrive from there and in which order. The test client
needs to maintain various states in its memory so that it can give a proper
answer to each messages.

To be exact, I need to launch many test clients who discuss with each other
and go to various states (a good analogue could be instant messaging with
various presence states and different messages).

So far, what I have been poking into Jmeter sources, all examples have been
quite static - individual HTTP requests and so on. Do you think Jmeter is
right tool for me? How should I approach the problem? So far, I have been
reading Jmeter sources and I know how to create a support for new protocol.
But I am afraid I don't know how to deal with asynchronous incoming
messages... A lot of ifs after each "SIP Request"? Doesn't sound too good...

Any help would be appreciated.

-- 
Mikko Ohtamaa
mikko.ohtamaa@ardites.com
+358 40 743 9707


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


RE: Extending Jmeter for highly asynchronous protocol

Posted by Mikko Ohtamaa <mi...@ardites.com>.
> JMeter was originally designed for testing HTTP servers. It has since been
expanded to test other request/response servers.

> The current samplers are all effectively synchronous.

> It is not clear how or whether it could be extended to deal with
asynchronous testing. Sorry I can't be more specific.

Ok, here is my plan

Use case: I need to make users from predefined list to chat with each other.
Each user needs a persistent connection to the server.

The test client must
1) Login
2) Maintain the session (must be able to answer PING messages in certain
timeout)
3) Send messages to other logged in test clients
4) See if message replies ever arrive 

Basically, I need to have per thread state variables and I must be able to
use those state variables in assertations to check if we have received a
response. If I can have per-thread state variables, I might be have
per-thread stateful connection objects too (maintain the connection over
many input messages).

Also, I need to have some kind of timestamps to wait for responses, so my
branching code can check if we receive a certain message of n possible
messages in certain timeout.

My plan (pseudo test plan)

2. Create a SIP Login request
- Fetch username and password from login pool (SIPUsersPool, Config
element?)
- Mark this user as logged into pool so it can be used for the instant
messaging
3. Loop here 
3.1. Create a SIP sampler
     - Get the latest message from opened SIP pipe (Is Jmeter able to keep
per-thread connections open?)
3.2. Branch
3.2.1. If the message is PING message send SIP response PONG (keep alive)
3.2.2. If the message is instant messaging message send SIP response
RECEIVED
3.2.3. If the message is RECEIVED (confirm succesful instant message,
originated by this client) set response_received = True
3.3 Wait some random time
3.4. If we previously have send IM (send_message = true) and some time has
passed since sending (now > send_message_timestamp + delay) assert that
response_received = True, otherwise looks like our communication channel has
failed
3.5. Get random user from logged in pool and send instant messaging for him
(send_message = true, send_mesage_timestamp = now)
3.6. Wait some random time

Do you think this would be feasible with Jmeter?

-Mikko


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


Re: Extending Jmeter for highly asynchronous protocol

Posted by sebb <se...@gmail.com>.
JMeter was originally designed for testing HTTP servers. It has since
been expanded to test other request/response servers.

The current samplers are all effectively synchronous.

It is not clear how or whether it could be extended to deal with
asynchronous testing. Sorry I can't be more specific.

S.
On 03/08/06, Mikko Ohtamaa <mi...@ardites.com> wrote:
> Hi,
>
> I am planning to do some load testing over SIP (Session Initation) protocol.
> SIP is highly asynchronous protocol. After opening SIP pipe, you never know
> what kind of messages arrive from there and in which order. The test client
> needs to maintain various states in its memory so that it can give a proper
> answer to each messages.
>
> To be exact, I need to launch many test clients who discuss with each other
> and go to various states (a good analogue could be instant messaging with
> various presence states and different messages).
>
> So far, what I have been poking into Jmeter sources, all examples have been
> quite static - individual HTTP requests and so on. Do you think Jmeter is
> right tool for me? How should I approach the problem? So far, I have been
> reading Jmeter sources and I know how to create a support for new protocol.
> But I am afraid I don't know how to deal with asynchronous incoming
> messages... A lot of ifs after each "SIP Request"? Doesn't sound too good...
>
> Any help would be appreciated.
>
> --
> Mikko Ohtamaa
> mikko.ohtamaa@ardites.com
> +358 40 743 9707
>
>
> ---------------------------------------------------------------------
> 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: Extending Jmeter for highly asynchronous protocol

Posted by Peter Lin <wo...@gmail.com>.
JMeter can test async protocols like messaging.  To get it to work though
isn't easy. You can look at how the JMS point-to-point sampler works. the
hard part is really correlating the request message with the response
message.

peter

On 8/3/06, Mikko Ohtamaa <mi...@ardites.com> wrote:
>
> Hi,
>
> I am planning to do some load testing over SIP (Session Initation)
> protocol.
> SIP is highly asynchronous protocol. After opening SIP pipe, you never
> know
> what kind of messages arrive from there and in which order. The test
> client
> needs to maintain various states in its memory so that it can give a
> proper
> answer to each messages.
>
> To be exact, I need to launch many test clients who discuss with each
> other
> and go to various states (a good analogue could be instant messaging with
> various presence states and different messages).
>
> So far, what I have been poking into Jmeter sources, all examples have
> been
> quite static - individual HTTP requests and so on. Do you think Jmeter is
> right tool for me? How should I approach the problem? So far, I have been
> reading Jmeter sources and I know how to create a support for new
> protocol.
> But I am afraid I don't know how to deal with asynchronous incoming
> messages... A lot of ifs after each "SIP Request"? Doesn't sound too
> good...
>
> Any help would be appreciated.
>
> --
> Mikko Ohtamaa
> mikko.ohtamaa@ardites.com
> +358 40 743 9707
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>