MQTT Keyword Library Robot Framework
Project description
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.
Installation
MQTTLibrary can be installed using pip:
pip install robotframework-mqttlibrary
You can also install it from the source distribution by running:
python setup.py install
You may need to run the above command with administrator privileges.
Usage
Import the library:
*** Settings ***
Library MQTTLibrary
Connect to the broker, publish and disconnect:
*** Test Cases ***
Publish
Connect 127.0.0.1
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
Connect 127.0.0.1
Subscribe and Validate topic=test/mqtt_test qos=1 payload=test
[Teardown] Disconnect
Keyword documentation is available at: http://randomsync.github.io/robotframework-mqttlibrary.
Also look at tests folder for examples.
For general information about using test libraries with Robot Framework, see Robot Framework User Guide.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for robotframework-mqttlibrary-0.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d72c8d14960884025cf0c92d2e001c8b85fd859af5d306ced81e586156f4fa0 |
|
MD5 | 2c50f72928fac78e727eaef99ee8f200 |
|
BLAKE2b-256 | 4f084020522edfb7c9c60d4814ed6c92f2f209f287054e66f1ea9c84a6a4e53d |
Hashes for robotframework_mqttlibrary-0.3.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbec6d678116866f586ed53a42c299d929afe93f36e864cf8056012cc1777af3 |
|
MD5 | 011224e6fa5c31e7ddefe98e613168dc |
|
BLAKE2b-256 | f3e5c120f0728c1371d0c9630491e62ae0658706e247054ea2f37707cca8cbfd |