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#

  1. Install Docker

  2. Setup ipv6 for default bridge network

Run Tests In a Docker Container#

  1. 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.

  1. Clone repo (or a fork) -

git clone https://github.com/project-chip/connectedhomeip.git
  1. 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'
  1. Build chef app -

./examples/chef/chef.py -b -d {app_name} -t linux
  1. Run test file (fill in app_name and test_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#