{"id":21191927,"url":"https://github.com/edgeimpulse/integration-tests-firmware","last_synced_at":"2025-05-07T18:20:35.446Z","repository":{"id":42092408,"uuid":"263853076","full_name":"edgeimpulse/integration-tests-firmware","owner":"edgeimpulse","description":"Integration tests for the Edge Impulse remote management and serial protocol","archived":false,"fork":false,"pushed_at":"2025-02-10T10:10:55.000Z","size":1325,"stargazers_count":4,"open_issues_count":17,"forks_count":0,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-04-30T21:46:07.913Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause-clear","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edgeimpulse.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":"2020-05-14T08:04:22.000Z","updated_at":"2025-03-13T16:39:00.000Z","dependencies_parsed_at":"2023-02-18T04:55:19.840Z","dependency_job_id":null,"html_url":"https://github.com/edgeimpulse/integration-tests-firmware","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/edgeimpulse%2Fintegration-tests-firmware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgeimpulse%2Fintegration-tests-firmware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgeimpulse%2Fintegration-tests-firmware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgeimpulse%2Fintegration-tests-firmware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edgeimpulse","download_url":"https://codeload.github.com/edgeimpulse/integration-tests-firmware/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252931792,"owners_count":21827164,"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":[],"created_at":"2024-11-20T19:06:20.351Z","updated_at":"2025-05-07T18:20:35.422Z","avatar_url":"https://github.com/edgeimpulse.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Edge Impulse device integration tests\n\nThis contains device integration tests for the Edge Impulse [remote management](https://docs.edgeimpulse.com/reference-link/remote-management) and [serial protocols](https://docs.edgeimpulse.com/reference#remote-mgmt-serial-protocol). It contains tests for both serial and IP communication, and sampling from the accelerometer and the microphone. If your device has a different sensor configuration you'll have to update the tests.\n\n## How to run\n\n1. Create an Edge Impulse account specifically for the tests. Ensure that there is only one project listed under the account, and that the account is activated.\n1. Install the [Edge Impulse CLI](https://docs.edgeimpulse.com/docs/cli-installation) and ensure that the CLI can see your development board. If not, you'll need to provide a PR for the CLI first.\n1. Clone this repository.\n\n    ```\n    $ git clone https://github.com/edgeimpulse/integration-tests-firmware\n    ```\n\n1. Install dependencies:\n\n    ```\n    $ npm install\n    $ npm install chromedriver@latest\n    ```\n\n1. Run the tests:\n\n    ```\n    ./node_modules/typescript/bin/tsc -p . \u0026\u0026 \\\n        EI_USERNAME=\"xxx\" \\\n        EI_PASSWORD=\"xxx\" \\\n        EI_PROJECTNAME=\"xxx\" \\\n        EI_HMACKEY=\"xxx\" \\\n        EI_TESTWIFI=1 \\\n        SELENIUM_WIFI_SSID=\"xxx\" \\\n        SELENIUM_WIFI_PASSWORD=\"xxx\" \\\n        TEST_ACCELEROMETER=1 \\\n        TEST_MICROPHONE=1 \\\n        ./node_modules/.bin/wdio wdio.headless.chrome.js\n    ```\n\n    With these options:\n\n    * `EI_USERNAME` - the Edge Impulse username of your test account.\n    * `EI_PASSWORD` - the Edge Impulse password of your test account.\n    * `EI_PROJECTNAME` - the name of the only project for your test account.\n    * `EI_HMACKEY` - the development HMAC key for the project (see **Keys** under the studio's dashboard).\n    * `EI_TESTWIFI` - whether to test WiFi connection.\n    * `SELENIUM_WIFI_SSID` - if WiFi was enabled, the SSID of the network.\n    * `SELENIUM_WIFI_PASSWORD` - if WiFi was enabled, the SSID of the network.\n    * `TEST_ACCELEROMETER` - whether to test the accelerometer.\n    * `TEST_MICROPHONE` whether to test the microphone.\n    * `ACCELEROMETER_SENSOR_NAME` - name of the accelerometer sensor (default: 'Built-in accelerometer').\n    * `MICROPHONE_SENSOR_NAME` - name of the microphone sensor (default: 'Built-in microphone').\n\n1. This yields a test report:\n\n    ```\n    [chrome  mac os x #0-0] Spec: /Users/janjongboom/repos/integration-tests-firmware/build/device-integration.js\n    [chrome  mac os x #0-0] Running: chrome on mac os x\n    [chrome  mac os x #0-0] Session ID: b81ab4177bdb379c34e09d8590cd1b77\n    [chrome  mac os x #0-0]\n    [chrome  mac os x #0-0] device integration\n    [chrome  mac os x #0-0]     environment variables\n    [chrome  mac os x #0-0]        ✓ should have EI_USERNAME set\n    [chrome  mac os x #0-0]        ✓ should have EI_PASSWORD set\n    [chrome  mac os x #0-0]        ✓ should have EI_PROJECTNAME set\n    [chrome  mac os x #0-0]        ✓ should have EI_HMACKEY set\n    [chrome  mac os x #0-0]        ✓ should have EI_TESTWIFI set\n    [chrome  mac os x #0-0]\n    [chrome  mac os x #0-0]     logging in\n    [chrome  mac os x #0-0]        ✓ allows logging in\n    [chrome  mac os x #0-0]\n    [chrome  mac os x #0-0]     daemon\n    [chrome  mac os x #0-0]         clearing configuration\n    [chrome  mac os x #0-0]            ✓ should clear configuration\n    [chrome  mac os x #0-0]\n    [chrome  mac os x #0-0]         accelerometer\n    [chrome  mac os x #0-0]             training data\n    [chrome  mac os x #0-0]                ✓ shows data posted by the ingestion API\n    [chrome  mac os x #0-0]                ✓ has correct label\n    [chrome  mac os x #0-0]                ✓ passed signature verification\n    [chrome  mac os x #0-0]                ✓ allows deleting sample\n    [chrome  mac os x #0-0]\n    [chrome  mac os x #0-0]             testing data\n    [chrome  mac os x #0-0]                ✓ shows data posted by the ingestion API\n    [chrome  mac os x #0-0]                ✓ has correct label\n    [chrome  mac os x #0-0]                ✓ passed signature verification\n    [chrome  mac os x #0-0]                ✓ allows deleting sample\n    [chrome  mac os x #0-0]\n    [chrome  mac os x #0-0]         microphone\n    [chrome  mac os x #0-0]             training data\n    [chrome  mac os x #0-0]                ✓ shows data posted by the ingestion API\n    [chrome  mac os x #0-0]                ✓ has correct label\n    [chrome  mac os x #0-0]                ✓ passed signature verification\n    [chrome  mac os x #0-0]                ✓ allows deleting sample\n    [chrome  mac os x #0-0]\n    [chrome  mac os x #0-0]             testing data\n    [chrome  mac os x #0-0]                ✓ shows data posted by the ingestion API\n    [chrome  mac os x #0-0]                ✓ has correct label\n    [chrome  mac os x #0-0]                ✓ passed signature verification\n    [chrome  mac os x #0-0]                ✓ allows deleting sample\n    [chrome  mac os x #0-0]\n    [chrome  mac os x #0-0]         shutting down daemon\n    [chrome  mac os x #0-0]            ✓ shuts down daemon\n    [chrome  mac os x #0-0]\n    [chrome  mac os x #0-0]     wifi\n    [chrome  mac os x #0-0]         environmental variables\n    [chrome  mac os x #0-0]            ✓ has wifi credentials set\n    [chrome  mac os x #0-0]\n    [chrome  mac os x #0-0]         clearing configuration\n    [chrome  mac os x #0-0]            ✓ should clear configuration\n    [chrome  mac os x #0-0]\n    [chrome  mac os x #0-0]         accelerometer\n    [chrome  mac os x #0-0]             training data\n    [chrome  mac os x #0-0]                ✓ shows data posted by the ingestion API\n    [chrome  mac os x #0-0]                ✓ has correct label\n    [chrome  mac os x #0-0]                ✓ passed signature verification\n    [chrome  mac os x #0-0]                ✓ allows deleting sample\n    [chrome  mac os x #0-0]\n    [chrome  mac os x #0-0]             testing data\n    [chrome  mac os x #0-0]                ✓ shows data posted by the ingestion API\n    [chrome  mac os x #0-0]                ✓ has correct label\n    [chrome  mac os x #0-0]                ✓ passed signature verification\n    [chrome  mac os x #0-0]                ✓ allows deleting sample\n    [chrome  mac os x #0-0]\n    [chrome  mac os x #0-0]         microphone\n    [chrome  mac os x #0-0]             training data\n    [chrome  mac os x #0-0]                ✓ shows data posted by the ingestion API\n    [chrome  mac os x #0-0]                ✓ has correct label\n    [chrome  mac os x #0-0]                ✓ passed signature verification\n    [chrome  mac os x #0-0]                ✓ allows deleting sample\n    [chrome  mac os x #0-0]\n    [chrome  mac os x #0-0]             testing data\n    [chrome  mac os x #0-0]                ✓ shows data posted by the ingestion API\n    [chrome  mac os x #0-0]                ✓ has correct label\n    [chrome  mac os x #0-0]                ✓ passed signature verification\n    [chrome  mac os x #0-0]                ✓ allows deleting sample\n    [chrome  mac os x #0-0]\n    [chrome  mac os x #0-0] 42 passing (1m 30.1s)\n\n\n    Spec Files:      1 passed, 1 total (100% completed) in 00:01:30\n    ```\n\n### Using Firefox\n\nThe default driver is Chrome, but you can also use Firefox via:\n\n```\n./node_modules/typescript/bin/tsc -p . \u0026\u0026 \\\n    EI_USERNAME=\"xxx\" \\\n    EI_PASSWORD=\"xxx\" \\\n    EI_PROJECTNAME=\"xxx\" \\\n    EI_HMACKEY=\"xxx\" \\\n    EI_TESTWIFI=1 \\\n    SELENIUM_WIFI_SSID=\"xxx\" \\\n    SELENIUM_WIFI_PASSWORD=\"xxx\" \\\n    TEST_ACCELEROMETER=1 \\\n    TEST_MICROPHONE=1 \\\n    ./node_modules/.bin/wdio wdio.headless.firefox.js\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgeimpulse%2Fintegration-tests-firmware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedgeimpulse%2Fintegration-tests-firmware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgeimpulse%2Fintegration-tests-firmware/lists"}