Skip to main content

pytest-play support for MQTT

Project description

play mqtt

https://img.shields.io/pypi/v/play_mqtt.svg https://img.shields.io/travis/tierratelematics/play_mqtt.svg Documentation Status Updates https://codecov.io/gh/tierratelematics/play_mqtt/branch/develop/graph/badge.svg

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.

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:

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

play_mqtt-0.0.1.tar.gz (11.8 kB view hashes)

Uploaded Source

Built Distribution

play_mqtt-0.0.1-py2.py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page