{"id":13488528,"url":"https://github.com/wasslz/Thingsboard-Load-Test","last_synced_at":"2025-03-28T01:36:09.656Z","repository":{"id":50185616,"uuid":"208732784","full_name":"wasslz/Thingsboard-Load-Test","owner":"wasslz","description":"Python script that's used to do load testing on Thingsboard platform built on thingsboard-python-client-sdk  ","archived":false,"fork":false,"pushed_at":"2021-06-02T00:25:14.000Z","size":1735,"stargazers_count":12,"open_issues_count":4,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-01T18:37:58.470Z","etag":null,"topics":["load-testing","mqtt","python","test-automation","thingsboard"],"latest_commit_sha":null,"homepage":"https://wasslz.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wasslz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-16T07:05:41.000Z","updated_at":"2024-01-27T10:17:17.000Z","dependencies_parsed_at":"2022-09-14T21:20:54.061Z","dependency_job_id":null,"html_url":"https://github.com/wasslz/Thingsboard-Load-Test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasslz%2FThingsboard-Load-Test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasslz%2FThingsboard-Load-Test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasslz%2FThingsboard-Load-Test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasslz%2FThingsboard-Load-Test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wasslz","download_url":"https://codeload.github.com/wasslz/Thingsboard-Load-Test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222333976,"owners_count":16968058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["load-testing","mqtt","python","test-automation","thingsboard"],"created_at":"2024-07-31T18:01:17.513Z","updated_at":"2025-03-28T01:36:09.634Z","avatar_url":"https://github.com/wasslz.png","language":"Python","funding_links":[],"categories":["Python","Tools"],"sub_categories":[],"readme":"# Thingsboard Load Test Tool\n\nIn this python script we are trying to create an automated load testing tool for Thingsboard, this tools has three main functions:\n* Create a specified number of devices using API \n* Publish an MQTT using [ThingsBoard client Python SDK](https://github.com/thingsboard/thingsboard-python-client-sdk \"ThingsBoard client Python SDK\")\n* Delete devices using API\n\nWe hope to make this tool to be in the form of Master  -\u003e slaves schema, where the master creates devices and distribute the jobs and token to the slaves which may be located on a multi remote mahines.\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.\n\n### Prerequisites\n\nWhat things you need to install the software and how to install them.\nThe tool was written in Python3, so make sure that you have it install on your system also you need pip3 to install requirements.\n```\n pip3 install -r requirements.txt\n```\nAlso you need MySQL database to store devices IDs and tokens used by thingsboard, use following query to create the MySQL table\n\n```sql\nCREATE TABLE devices (devIndex INT , devID VARCHAR(255) , name VARCHAR(255), token VARCHAR(255) );\n```\n### Configuration\nThe configuration is in YAML formating, it is very clear and simple\n\n```yaml\nmysql: #MySQL connections parameters\n    host: localhost\n    user: db_user\n    password: changeme\n    db: db_name\nhttp:\n    http_host: https://demo.thingsboard.io #url to API backend of thingsboard\nmqtt_node:\n    mqtt_host: demo.thingsboard.io # mqtt host name\n    auth_token: \"\" # Thingsboard authentication token*\ndevices:\n    start_index: 0 # the index of the first device to be created \n    devices_count: 3 # number of devices be created\npublish:\n    delay: 5 # in seconds between every message\n    messages_count: 3 # number of msgs to be published by each device\n```\n*For authentication token  Please refer to  [ThingsBoard API reference](https://thingsboard.io/docs/reference/rest-api/#rest-api-auth \"ThingsBoard API reference\")\n## Usage\n\n```\n python3 publisher.py -c config.yaml\n```\n\n## Contributing\nThe project is still on the PoC phase, the current script is doing the main jobs but it needs too much of working to be perfect, so all contribution are very welcomed.\n\n## Roadmap\n* create a job manager functions that creates jobs and distribute the tokens over the slaves\n* create a communications mechanisism between the slave and the master (socket is sugested)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasslz%2FThingsboard-Load-Test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwasslz%2FThingsboard-Load-Test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasslz%2FThingsboard-Load-Test/lists"}