Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ?xml version="1.0"?>
- <!DOCTYPE tsung SYSTEM "~/.tsung/tsung-1.0.dtd">
- <tsung loglevel="debug" version="1.0" dumptraffic="true">
- <!-- Client side setup -->
- <clients>
- <client host="localhost" use_controller_vm="true" maxusers="200" />
- </clients>
- <!-- Server side setup -->
- <servers>
- <server host="site_url" port="80" type="tcp"></server>
- </servers>
- <load>
- <!-- several arrival phases can be set: for each phase, you can set
- the mean inter-arrival time between new clients and the phase
- duration -->
- <arrivalphase phase="1" duration="100" unit="second">
- <users interarrival="100" unit="second"></users>
- </arrivalphase>
- </load>
- <!-- Additional testing options -->
- <options>
- <option name="websocket_path" value="/socket.io/1/websocket"/>
- <!-- How to distribute user-agents among Tsung sessions -->
- <option type="ts_http" name="user_agent">
- <user_agent probability="80">Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Galeon/1.3.21</user_agent>
- <user_agent probability="20">Mozilla/5.0 (Windows; U; Windows NT 5.2; fr-FR; rv:1.7.8) Gecko/20050511 Firefox/1.0.4</user_agent>
- </option>
- </options>
- <!-- start a session for a http user. the probability is the
- frequency of this type os session. The sum of all session's
- probabilities must be 100 -->
- <sessions>
- <session name="activity_browse" probability="100" type="ts_http">
- <request>
- <dyn_variable name="sid" re="\r\n\r\n([^:]+):[^:]+:[^:]+:[^:]+"/>
- <http url="/socket.io/1/" method="POST" version="1.1" contents=""></http>
- </request>
- <change_type new_type="ts_websocket" host="site_url" port="80" server_type="tcp" restore="true" store="true" />
- <request subst="true">
- <websocket type="connect" path='/socket.io/1/websocket/%%_sid%%'></websocket>
- </request>
- <thinktime value="2"/>
- <request>
- <websocket type="message">5:1+::{"name":"first:event","args":[]}</websocket>
- </request>
- <thinktime value="2"/>
- <request><websocket type="close"></websocket></request>
- </session>
- </sessions>
- </tsung>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement