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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a1083e51e3bb1e6630ca814cf7b67a59dc9a65baf8438d9eb82305d4e51d8f0 |
|
MD5 | f83cbd33cca4fdb30367cbc5bcbb184c |
|
BLAKE2b-256 | b72dbc4816233aee702d27982b9adc6fe2260336757ac99449db8ba5a2cac566 |
Hashes for robotframework_mqttlibrary-0.3.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67230c7deb0143699257f5d3b0e3f2e5aefe9dc9dbeb97677708fd972ce7f030 |
|
MD5 | 678c1904348f176cb2d043ea423e866d |
|
BLAKE2b-256 | d913f0abe4df55311d6d8fc9dc08ebbe45b35de04acce674e6d5db82d0e633d9 |