skip to navigation
skip to content

robotframework-mqttlibrary 0.5.0

MQTT Keyword Library Robot Framework

Package Documentation

MQTTLibrary is a Robot Framework library that provides keywords for testing on MQTT brokers. MQTT is a lightweight protocol for machine-to-machine communication, typically used for IoT messaging. This library uses the paho client library published by eclipse project.


MQTTLibrary can be installed using pip:

pip install robotframework-mqttlibrary

You can also install it from the source distribution by running:

python install

You may need to run the above command with administrator privileges.


Import the library:

*** Settings ***
Library          MQTTLibrary

Connect to the broker, publish and disconnect:

*** Test Cases ***
    Publish     topic=test/mqtt_test    message=test message
    [Teardown]  Disconnect

Connect to the broker, subscribe and validate that a message is received:

*** Test Cases ***
Subsribe and Validate
    Subscribe and Validate  topic=test/mqtt_test    qos=1   payload=test
    [Teardown]              Disconnect

Keyword documentation is available at:

Also look at tests folder for examples.

For general information about using test libraries with Robot Framework, see Robot Framework User Guide.

File Type Py Version Uploaded on Size
robotframework-mqttlibrary-0.5.0.tar.gz (md5) Source 2016-03-01 10KB
robotframework_mqttlibrary-0.5.0-py2-none-any.whl (md5) Python Wheel py2 2016-03-01 10KB