<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/usr/local/share/tsung/tsung-1.0.dtd">
<tsung loglevel="notice" dumptraffic="false" version="1.0">

  <clients>
    <client host="localhost" use_controller_vm="true">
    </client>
  </clients>

<servers>
   <server host='127.0.0.1' port='5222' type='tcp'/>
</servers>

<load>
  <arrivalphase phase="1" duration="5" unit="minute">
    <users interarrival="0.1" unit="second"></users>
  </arrivalphase>
  </load>

<options>
  <option type="ts_jabber" name="global_number" value="5"></option>
  <option type="ts_jabber" name="userid_max" value="20000"></option>
  <option type="ts_jabber" name="domain" value="erlang-projects.org"></option>
  <option type="ts_jabber" name="username" value="tsung"></option>
  <option type="ts_jabber" name="passwd" value="tsung"></option>
</options>

<sessions>
  <!-- set bidi to true -->
 <session bidi="true" probability="100" name="jabber-example" type="ts_jabber">

   <request> <jabber type="connect" ack="local"></jabber> </request>
   <transaction name="authenticate">
     <request> <jabber type="auth_get" ack="local"></jabber> </request>
     <request> <jabber type="auth_set_plain" ack="local"></jabber> </request>
   </transaction>

   <thinktime value="2"></thinktime>

   <request> <jabber type="iq:roster:get" ack="local"/> </request>

  <thinktime value="2"></thinktime>

  <request> <jabber type="presence:initial" ack="no_ack"/> </request>

  <thinktime value="60"></thinktime>

  <!-- add five online users in the roster -->
  <transaction name="rosteradd">
    <request> <jabber type="iq:roster:add" ack="no_ack" destination="online"></jabber> </request>
    <request> <jabber type="presence:subscribe" ack="no_ack"/> </request>

    <request> <jabber type="iq:roster:add" ack="no_ack" destination="online"></jabber> </request>
    <request> <jabber type="presence:subscribe" ack="no_ack"/> </request>

    <request> <jabber type="iq:roster:add" ack="no_ack" destination="online"></jabber> </request>
    <request> <jabber type="presence:subscribe" ack="no_ack"/> </request>

    <request> <jabber type="iq:roster:add" ack="no_ack" destination="online"></jabber> </request>
    <request> <jabber type="presence:subscribe" ack="no_ack"/> </request>

    <request> <jabber type="iq:roster:add" ack="no_ack" destination="online"></jabber> </request>
    <request> <jabber type="presence:subscribe" ack="no_ack"/> </request>
  </transaction>

 <!-- wait a long time  to let others session to add me in their roster-->
  <thinktime value="600"></thinktime>

  <request> <jabber type="presence:final" ack="no_ack"/> </request>
  <thinktime value="1"></thinktime>
  <request> <jabber type="close" ack="local"></jabber> </request>

 </session>
</sessions>
</tsung>
