erlangxmppejabberdtsung

Simulating online user in eJabberd with Tsung


I'm testing eJabberd server with Tsung on local computer. This is my config file. Everything is working and running correctly.

<?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" maxusers="28000" use_controller_vm="true">
    </client>
  </clients>

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

<monitoring>
          <monitor host="localhost" type="erlang"/>
  </monitoring>

<!-- register 15000 users in less than 15 minutes  -->
<load>
  <arrivalphase phase="1" duration="5" unit="minute">
    <users maxnumber="15000" interarrival="0.0025" unit="second"></users>
  </arrivalphase>
  </load>

<options>
  <option type="ts_jabber" name="global_number" value="15000"></option>
  <option type="ts_jabber" name="userid_max" value="15000"></option>
  <option type="ts_jabber" name="domain" value="localhost"></option>
  <option type="ts_jabber" name="username" value="test"></option>
  <option type="ts_jabber" name="passwd" value="password"></option>
</options>

<sessions>
  <session probability="100" name="jabber-example" type="ts_jabber">

       <request> <jabber type="connect" ack="global"></jabber> </request>

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

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

    <thinktime value="10"></thinktime>

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

    <thinktime value="30"></thinktime>

    <transaction name="online">
      <request> <jabber type="chat" ack="global" size="16" destination="online"/></request>
    </transaction>

    <thinktime value="30"></thinktime>

    <transaction name="close">
      <request> <jabber type="close" ack="local"> </jabber></request>
    </transaction>

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

Results:

Here you can see that there are simultaneous users and connections. However, when i look in my ejabberd console, there is absolutely no online has been connected. enter image description here enter image description here


Solution

  • I figured the solution:

    <session probability="100" name="sasl" type="ts_jabber">
        <request> <jabber type="connect" ack="local"></jabber> </request>
    
       <thinktime value="10"></thinktime>
    
       <transaction name="authenticate">
        <request>
          <jabber type="auth_sasl" ack="local"></jabber></request>
    
        <request>
          <jabber type="connect" ack="local"></jabber> </request>
    
       <request>
          <jabber type="auth_sasl_bind" ack="local" ></jabber></request>
       <request>
          <jabber type="auth_sasl_session" ack="local" ></jabber></request>
    
       </transaction>