Chef App Tests#
Tests written using Python CHIP Controller used for gating chef device functionality.
The chef_device_functional_test
job in
chef.yaml
shows all chef tests run in CI.
Running Locally (Linux, Docker)#
Setup Docker#
Run Tests In a Docker Container#
Start a bash shell in a chip-build-vscode container.
docker run -it --rm ghcr.io/project-chip/chip-build:140 /bin/bash
Run the remaining commands inside the container.
Clone repo (or a fork) -
git clone https://github.com/project-chip/connectedhomeip.git
Setup env -
cd connectedhomeip
git config --global --add safe.directory "*"
python scripts/checkout_submodules.py --shallow --recursive --platform linux
source ./scripts/bootstrap.sh
scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/python_env'
Build chef app -
./examples/chef/chef.py -b -d {app_name} -t linux
Run test file (fill in
app_name
andtest_file
) -
scripts/run_in_python_env.sh out/python_env './scripts/tests/run_python_test.py --app examples/chef/linux/out/{app_name} --factory-reset --script ./examples/chef/tests/{test_file}.py --script-args "--commissioning-method on-network --discriminator 3840 --passcode 20202021" --app-stdin-pipe /tmp/chef_stdin.txt'
Libraries#
matter_testing_infrastructure Python test utilities
matter_testing.py MatterBaseTest base class for tests.