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.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 779472c88620f8b38038e52e88c779ad79d4d03f322a4288621ffa3cf6793949 |
|
MD5 | f0ac9d13c0b9d92f0ffa9b9dfc4fbcbd |
|
BLAKE2b-256 | 7004d9817c2f5beaa1463095519bba55b4f05922e1dc4143f5de61040df0c179 |
Hashes for robotframework_mqttlibrary-0.4.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7556ea0d013b5cbae9b6363e6c1c2d7d52246ddd772c498ab0e5f50c272bfbdb |
|
MD5 | a33646340e07309358c87f45edd3eab8 |
|
BLAKE2b-256 | 70fd44a0912658a78f1aae7dba8906aa77faba7444d60be2dd9a19d307603557 |