pytest-play support for MQTT
Project description
play mqtt
pytest-play support for MQTT support.
Thanks to play_mqtt you can test the integration between a mocked IoT device that sends commands on MQTT and a reactive web application with UI checks.
You can also build a simulator that generates messages for you.
Free software: Apache Software License 2.0
Documentation: https://play-mqtt.readthedocs.io.
Features
This project defines a new pytest-play command:
{"provider": "mqtt", "type": "publish", "host": "$mqtt_host", "port": $mqtt_port, "endpoint": '$mqtt_endpoint', "payload": { "measure_id": [100], "obj_id_L": [0], "measureType": ["float"], "start_time": 1514911926114, "bin_value": [77251432] } }
You can add more commands adding new methods to the command provider implementation in providers.py module.
More info and examples on:
pytest-play, documentation
cookiecutter-qa, see pytest-play in action with a working example if you want to start hacking
Thanks to pytest-play you can drive your tests or simulators through a configuration file containing an array of commands.
Credits
This package was created with Cookiecutter and the cookiecutter-play-plugin (based on audreyr/cookiecutter-pypackage project template).
CHANGES
0.0.1 (2018-01-04)
First release
Project details
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 play_mqtt-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2d75f5b73aec1935da7d935e8ed69434016cc70d0dbc5dd31d6f091b5bc32f2 |
|
MD5 | 63465af0aa0d1f16712f9adf04af6a85 |
|
BLAKE2b-256 | 0ecd268acc1ce1ed663404cf1b76f76426166b30a3a2538ea0e15193c3ee8a99 |