[erlang-questions] Tsung & MQTT: Checking messages received

Ivan Uemlianin <>
Fri Feb 10 12:31:34 CET 2017


Dear All

I written to the tsung ML on this with no response.  Copying here in 
case tsung experts present.

I am planning to use tsung to test a server providing a service over 
mqtt.  The basics are working, but I would like to check that sessions 
receive expected messages.

When using mqtt (ie rather than http), does tsung support checking 
server responses by using the <match> element in the config xml file?  I 
have not been able to get it working.

In the config xml I have a session with requests as below, with a match 
element specifying the expected message:

   <request subst="true">
     <mqtt type="subscribe" topic="test_topic" qos="1"></mqtt>
   </request>

   <request>
     <match do="log" when="match" name="empty"></match>
     <match do="log" when="match" name="test1">
       {"call":"test", "response":6}
     </match>
     <mqtt type="waitForMessages" timeout="30"></mqtt>
   </request>

With dumptraffic="true", the tsung.dump shows that {"call":"test", 
"response":6} is received on test_topic, but there is nothing in 
match.log, or anywhere else, that records this.  Similarly if the 
expected message is not received, no errors are recorded anywhere.

The "empty" match should always match and always be logged, but in mqtt 
sessions is never triggered.

Adding a skip_headers="mqtt" attribute to the match element doesn't 
change anything.

Is there something else I should do to check received messages in mqtt?

Is the <match> element not supported in mqtt?

With thanks and best wishes

Ivan


-- 
============================================================
Ivan A. Uemlianin PhD
Llaisdy
Speech Technology Research and Development

                     
                         @llaisdy
                          llaisdy.wordpress.com
               github.com/llaisdy
                      www.linkedin.com/in/ivanuemlianin

                         festina lente
============================================================



More information about the erlang-questions mailing list