[Tsung] mixing session types

Nicolas Niclausse nicolas at niclux.org
Fri Jan 15 10:46:51 CET 2010


Craig Jolicoeur ecrivait le 13/01/2010 22:16:
> Is it possible to "mix" session types with Tsung?
> 
> For instance, I need to do a load test that includes both HTTP traffic
> and XMPP traffic.  Some of the XMPP traffic is based on information
> received during the HTTP session and the two need to be tested at the
> same time.
> 
> Is this currently possible with Tsung?  Judging by the documentation,
> my initial thought is that it's not, but I wanted to verify that
> observation.
> 
> If it's not possible, what are potential workarounds, if any?


You can try the latest version on svn (rev1069)


i added a new tag 'change_type' to be used like this in a session:

    <request> <jabber type="chat" ack="no_ack" size="16"
destination="offline"/> </request>

    <thinktime value="3"/>

    <change_type new_type="ts_http" host="foo.bar" port="80"
server_type="tcp" store="true"/>

    <request> <http url="http://foo.bar/"/> </request>
    <request> <http url="/favicon"/> </request>

    <change_type new_type="ts_jabber" host="localhost" port="5222"
server_type="tcp" restore="true"/>

    <request> <jabber type="chat" ack="no_ack" size="16"
destination="previous"/> </request>


store='true' can be used to save the current state of the session (socket,
cookies for http, ...) and restore='true' to reuse the previous state when
you switch back to the old protocol.

a dynamic variable set in the first part of the session will be available
after a change_type.

There is currently one caveat: you have to use an full url in the first
http request after a <change_type> (a relative url will fail)

-- 
Nicolas


More information about the Tsung-users mailing list