{"id":29843023,"url":"https://github.com/pelioniot/client-e2e-python-test-library","last_synced_at":"2026-03-02T11:01:44.240Z","repository":{"id":46575320,"uuid":"191769476","full_name":"PelionIoT/client-e2e-python-test-library","owner":"PelionIoT","description":"Python Test library for Izuma DM Client end-2-end tests","archived":false,"fork":false,"pushed_at":"2025-09-25T04:42:41.000Z","size":190,"stargazers_count":6,"open_issues_count":4,"forks_count":5,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-09-25T06:22:11.220Z","etag":null,"topics":["iot","pytest"],"latest_commit_sha":null,"homepage":"https://www.izumanetworks.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/PelionIoT.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-06-13T13:35:42.000Z","updated_at":"2024-10-03T18:55:26.000Z","dependencies_parsed_at":"2023-12-11T14:30:18.517Z","dependency_job_id":"a1d38f94-e4d5-4094-9342-53e0f0f0a442","html_url":"https://github.com/PelionIoT/client-e2e-python-test-library","commit_stats":null,"previous_names":["pelioniot/client-e2e-python-test-library"],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/PelionIoT/client-e2e-python-test-library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PelionIoT%2Fclient-e2e-python-test-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PelionIoT%2Fclient-e2e-python-test-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PelionIoT%2Fclient-e2e-python-test-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PelionIoT%2Fclient-e2e-python-test-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PelionIoT","download_url":"https://codeload.github.com/PelionIoT/client-e2e-python-test-library/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PelionIoT%2Fclient-e2e-python-test-library/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29999218,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T09:59:02.300Z","status":"ssl_error","status_checked_at":"2026-03-02T09:59:02.001Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["iot","pytest"],"created_at":"2025-07-29T15:41:38.127Z","updated_at":"2026-03-02T11:01:44.219Z","avatar_url":"https://github.com/PelionIoT.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Client E2E Python test library\n\nIzuma Client E2E tests verify that a target platform can perform essential Device Management Client operations.\nThe library is designed to be used with the [pytest test framework](https://docs.pytest.org/en/latest/).\n\n## Prerequisites\n\nPython 3.8 or later.\n\n## Installation\n\n```bash\n$ git clone https://github.com/PelionIoT/client-e2e-python-test-library.git\n$ pip install wheel\n$ python3 setup.py bdist_wheel\n$ cd dist/\n$ pip install -I client_test_lib*.whl\n```\n\n## Basic usage\n\n- Build the [Device Management Client example application](https://developer.izumanetworks.com/docs/device-management/current/connecting/mbed-os.html) for your board and flash it.\n- Set the `CLOUD_API_KEY` environment variable with your [access key](https://developer.izumanetworks.com/docs/device-management/current/user-account/application-access-keys.html).\n    - Linux: `export CLOUD_API_KEY=\u003caccess_key_here\u003e`\n    - Windows: `set CLOUD_API_KEY=\u003caccess_key_here\u003e`\n- Default API address is `https://api.us-east-1.mbedcloud.com`. You can change this by defining `CLOUD_API_GW` environment variable in similar way as `CLOUD_API_KEY` is done above.\n- Test run will create temporary API key for the WebSocket callback channel by default. If you want to prevent that and use only the exported API key, add `--use_one_apikey` startup argument.\n- Tests use [pyOCD](https://pyocd.io/) for device discovery, with automatic fallback to [Mbed LS](https://github.com/ARMmbed/mbed-os-tools/tree/master/packages/mbed-ls) if pyOCD is not available.\n  - If you have only one board connected to the serial port, you don't need to select the device for the tests.\n  - If there are multiple boards connected to the serial port, you can use either:\n    - `pyocd list` to check pyOCD-discovered boards and use the board ID with `--target_id=[id]`\n    - `mbedls` to check mbed-discovered boards and use the target ID with `--target_id=[id]`\n\n  ```bash\n  # Using pyOCD (preferred)\n  $ pyocd list\n  [INFO] Available debug probes:\n  0: 0240000032044e4500257009997b00386781000097969900 (ST-Link V2-1)\n\n  # Using mbed-ls (fallback)\n  $ mbedls\n  +---------------+----------------------+-------------+--------------+--------------------------------------------------+-----------------+\n  | platform_name | platform_name_unique | mount_point | serial_port  | target_id                                        | daplink_version |\n  +---------------+----------------------+-------------+--------------+--------------------------------------------------+-----------------+\n  | K64F          | K64F[0]              | D:          | /dev/ttyACM0 | 0240000032044e4500257009997b00386781000097969900 | 0244            |\n  +---------------+----------------------+-------------+--------------+--------------------------------------------------+-----------------+\n\n  ```\n\n- You can also run tests with the [Linux build of the Device Management Client](https://developer.izumanetworks.com/docs/device-management/current/connecting/linux-on-pc.html) by passing the compiled binary in the `--local_binary=./mbedCloudClientExample.elf` argument.\n\n### Running a test set\n\nTo run a test set for Device Management Client use the command:\n\n```bash\npytest tests/dev-client-tests.py\n```\nRead later instructions how to setup the update test to go with the test set.\n\n### Running a single test\n\nTo run a single test from the set, use the [`-k` argument](https://docs.pytest.org/en/latest/example/markers.html?highlight=keyword#using-k-expr-to-select-tests-based-on-their-name) to set the test name as a keyword:\n\n```bash\npytest tests/dev-client-tests.py -k get_resource\n```\n\n### Running the update test\n\nBefore running the update test, make sure you create update-related configuration and initialize the developer environment properly, as describe [the Device Management Client example tutorial](https://developer.izumanetworks.com/docs/device-management/current/connecting/mbed-os.html).\n\nThe update test uses the `manifest-dev-tool` utility to create the actual manifest for update campaigns.\n\nTo run the update test, provide the mandatory update image path and optional manifest-dev-tool init path arguments at startup:\n- `--update_bin=/home/user/mbed-cloud-client-example_update.bin` absolute path for the update image\n- `--manifest_tool=/home/user/mbed-os-example-pelion` absolute path where manifest-dev-tool init is executed - defaults to the current working directory.\n\nTo leave the firmware image, manifest and campaign in your account after the test, add the `--no_cleanup` startup argument.\n\nManifest tool 2.0.0 supports two manifest schema versions: `v1` and `v3`. By default, the update test creates `v3` manifests, but you can create `v1` manifests by passing the `--manifest_version=v1` startup argument.\n\n\n### Results output\n\nAdd the startup arguments to adjust the generated output:\n- `--log-cli-level=DEBUG` adds more details\n- `--html=results.html` generates an HTML report\n- `--junitxml=junit.xml` provides output for CI systems, for example Jenkins\n\nThe library also writes a separate `client.log` file from the Device Management Client output.\n\n### Customized test runs\n\nThere are many ways to configure the test runs. Refer to the [full pytest documentation](https://docs.pytest.org/en/latest/contents.html) for more information.\n\n## Current tests\n\n| Test name                       | Main functions                                        | Notes                        |\n| ------------------------------- | ------------------------------------------------------| -----------------------------|\n| `test_01_get_device_id`         | Verify that the device is registered.                 |                              |\n| `test_02_get_resource`          | Verify that the device responds to GET.               | Uses Resource `/1/0/1`       |\n| `test_03_put_resource`          | Verify that the device responds to PUT.               | Uses Resource `/1/0/1`       |\n| `test_04_subscribe_resource`    | Verify the notification from the subscribed resource. | Uses Resource `/1/0/1`       |\n| `test_05_factory_reset`         | Verify the client's factory reset behaviour.          |                              |\n| `test_06_update_device`         | Verify the device firmware update.                    |                              |\n\n\n## License\n\nSee the [license](https://github.com/PelionIoT/client-e2e-python-test-library/blob/master/LICENSE) agreement.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpelioniot%2Fclient-e2e-python-test-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpelioniot%2Fclient-e2e-python-test-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpelioniot%2Fclient-e2e-python-test-library/lists"}