How to write xml scripts for load testing “XMPP over BOSH” using Tsung?
-
13-11-2019 - |
문제
I have to perform a comparison of "simple XMPP" with "XMPP over BOSH" for our mobile client(chat based). I want to use same tool to compare both. I searched on internet and found a tool called tsung which supports both HTTP and XMPP. I have setup and able to run tsung for XMPP with given example scripts.
Now the problem is that I am unable to write Tsung xml scripts for "XMPP over BOSH". I tried searching on internet but couldn't find any.
Can somebody please guide me in setting up Tsung for "XMPP over BOSH"?
Please let me know if there exist a tool other than Tsung which can serve my purpose.
해결책
From some time ago you can find BOSH support on TSUNG but only on their master branch in:
https://github.com/processone/tsung/blob/master/src/tsung/ts_bosh.erl
For enabling it in your script just change the type of connection to your servers to "bosh":
<server host="my_bosh_server" port="5280" type="bosh"></server>
Just make sure that your XMPP server is listening for BOSH connections on the "http-bind":
http://my_bosh_server:5280/http-bind
Alternatively you can use "bosh_ssl" instead of "bosh" if you want to add SSL to your connections. In any case, yes, it's completely undocumented.
다른 팁
Tsung is a good choice to test XMPP. And there is a jabber plugin of Tsung - this is a basic tool, just for basic XMPP like register, login, add contact/rename/delete, chat, MUC ,pubsub, presence(connected, online, offline ) ...
And also Tsung's jabber plugin supports raw XML - that means you can send any raw XML data to the server using the raw type :
raw XML You can send raw XML data to the server using the raw type:
<jabber type="raw" ack="no_ack" data="<stream>foo</stream>"></jabber>
Beware: you must encode XML characters like < ,>, &, etc.
For more content by http://tsung.erlang-projects.org/user_manual.html#htoc58