commit | f545f1440ab6dde1675a531679591d3ca1196988 | [log] [tgz] |
---|---|---|
author | Max Chen <chingtzuchen@google.com> | Tue Dec 14 14:13:40 2021 +0800 |
committer | Max Chen <chingtzuchen@google.com> | Tue Dec 14 14:15:37 2021 +0800 |
tree | 7a188837dbf0e9a93a9951de777e2643e9ac8cc2 | |
parent | 1db0a0829ee9f4a57a90aedb964a0a7ad6e2c0dd [diff] |
[Local Agent] Sync LA feature from source: 1. Update host for EAP partners 2. Fix unit test flakiness Change-Id: I579a1ad95bc6b8de7bd65faab0ccc13d9e353655
Test Suite for Smart Home with Matter is a developer platform to support 3rd-party partners build products using the Matter technology, which integrates with the Google Nest ecosystem.
To support partners in testing and certifying their products, Test Suite for Smart Home with Matter provides the tools and services to allow partners to comprehensively test their Matter products against the Google ecosystem in a scalable way.
Local Agent, one of the major components of Smart Home Partner Test Suite, is a software package which can be installed in the host machines at partners' laboratory. A local agent is required for running Auto test suite to command and control DUTs and perform Matter protocol operations at the testing site. Note that partners won't need to use local agent if they only aim to run Manual test suites.
In order to use local agent, partners will have to enable the Matter testability of their DUTs, please contact your Google Developer Support.
Note that this is not an officially supported Google product.
Clone the repo (at a desired place):
$ git clone https://testsuite-smarthome-matter.googlesource.com/local-agent
Create a dedicated virtual environment for developing local agent if you don't have one:
$ python3 -m venv <venv-name>
Important
: Make sure you're running a python version >= 3.7
, otherwise some packages are not supported.
Activate the virtual environment:
$ source <venv-name>/bin/activate
Install the local agent package in your virtual environment:
$ cd /path/to/{repo-base}/local-agent $ pip install .
For development, we might want to use
pip install -e .
for the last step. (See documentation of the “-e” option here)
You should be running the Smart Home testsuite from the frontend web app to link and use the local agent.
On the web app's Test Plan page, you should see a Local Agent Setup
button. Click on it, and if you haven’t linked your local agent before, you should see a linking code. Copy the linking code.
On your host machine, activate the virtual environment where you installed the local agent, and start the local agent by simply running $ local-agent
.
Once you’ve started your local agent, you should see a prompt that asks you for the linking code. Paste the linking code you copied from the web app. The local agent should start the linking process, and it will also start the device detection process, which should detect your DUTs that are connected to your host machine.
The device control library we're using in local agent is GDM, also known as Gazoo Device Manager, which is also a python package for interacting with Matter devices. To allow local agent to talk to your Matter devices, you must build and add your own Matter device controllers to GDM. Please follow the extension Matter controller codelab in GDM to build and install. Once your controllers are installed in your virtual environment, fill the names of your extension packages in ~/.config/google/local_agent_config.ini
. See example_config.ini
for references.