Brief introduction
Tsung is a stress testing tool that can test servers including HTTP, WebDAV, PostgreSQL, MySQL, LDAP, and Xmpp/jabber. For HTTP testing, Tsung supports
HTTP 1.0/1.1, which contains a proxy-mode session record, supports GET, POST and PUT, and DELETE methods, supports cookies and basic WWW authentication, and also supports SSL.
How the Tsung Works
(1) Each virtual user of Tsung is a lightweight process of Erlang. There is a big difference between this and LoadRunner.
(2) The virtual user disappears after completing the session.
(3) A large number of virtual users (Erlang lightweight processes) are built on ERLANGVM.
(4) A test machine can start more than one ERLANGVM, currently according to 1 CPU boot 1 ERLANGVM.
To install Tsung, see: http://www.cnblogs.com/yangxia-test/p/4330571.html
Tsung Test Tool Basic Test command for Tsung-f ~/.tsung/mqtt.xml-l < log save path > Start
Mqtt.xml are as follows (can be found under the/usr/share/doc/tsung/examples path):
<?xml version= "1.0"?>
<! DOCTYPE Tsung SYSTEM "/USR/SHARE/TSUNG/TSUNG-1.0.DTD" >
<tsung loglevel= "Debug" version= "1.0" >
<!--below for the client configuration, can have a number of clients, where Ubuntu to ensure that through SSH Ubuntu can remotely log on to Ubuntu this machine, here is recommended by the key pair to the remote client login. The following is similar to the LoadRunner load generator, which simulates the user. For detailed configuration Please refer to official documentation http://tsung.erlang-projects.org/user_manual/conf-client-server.html-->
The use of Tsung for the MQTT stress test