Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test scripts for ESF test plan #7

Conversation

koosc
Copy link

@koosc koosc commented Dec 11, 2024

  • Preliminary PR to show test scripts and changes to accommodate them.
  • Updates may be needed to reflect changes to test plan during PR
  • TC arguments allow for TC acceptance to be used outside of ESF tests, preventing other tests from needing changes if the device uses ESF

…ommissioning

This commit adds new Python-to-library bindings in the Matter test
framework, allowing the core commissioning library to handle the terms
and conditions (T&C) feature required for Matter device certification.
Specifically, these changes ensure that the Device Under Test (DUT) can
properly complete its commissioning process when T&C acknowledgements
are required.

Key changes include:
- Added `SetRequireTermsAndConditionsAcknowledgement` to indicate if T&C
  acknowledgements are necessary during commissioning.
- Introduced `SetTermsAcknowledgements` to pass the T&C version and user
  response required for commissioning.
- Added `SetSkipCommissioningComplete` to allow skipping the
  commissioning complete callback when needed.

These updates ensure the commissioning process can handle devices that
require T&C acknowledgements, supporting Matter device certification
workflows.
…sioning method in test framework

This commit introduces the necessary changes to pass through new test
configuration arguments that are critical for validating the
commissioning workflows of a DUT requiring terms and conditions (T&C)
acknowledgements. These updates support the proper configuration of
commissioning methods and T&C values for devices under test during
Matter certification.

Key changes include:
- Added `tc_version` and `tc_user_response` arguments to allow
  specifying the T&C version and user response during commissioning.
- Introduced the `in_test_commissioning_method` argument to define the
  specific commissioning method to be used within tests.
- Updated `populate_commissioning_args` and related test configuration
  classes to handle these new arguments.

These changes ensure that the commissioning process can be fully
validated, including scenarios that require T&C acknowledgements,
enhancing the test framework's ability to certify Matter devices.
Added TC_CGEN_2_8 so we can have pre-condition that device was commissioned, then user factory reset and user intent is first action

```bash
rm /tmp/chip* ; ./scripts/run_in_python_env.sh ./out/venv './scripts/tests/run_python_test.py --app out/linux-x64-terms-and-conditions/chip-terms-and-conditions-app --app-args "" --script ./src/python_testing/TC_CGEN_2_6.py --script-args "--trace-to json:log --in-test-commissioning-method on-network --qr-code MT:-24J0AFN00KA0648G00"'
```

```bash
export ZAP_DEVELOPMENT_PATH=/workspace/zap
./scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv'
./scripts/build/build_examples.py --target linux-x64-chip-tool --target linux-x64-all-clusters --target linux-x64-terms-and-conditions build

cat <<EOF > /tmp/test_env.yaml
ALL_CLUSTERS_APP: out/linux-x64-all-clusters/chip-all-clusters-app
TERMS_AND_CONDITIONS_APP: out/linux-x64-terms-and-conditions/chip-terms-and-conditions-app
EOF

rm /tmp/chip* ; ./scripts/run_in_python_env.sh ./out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_CGEN_2_5.py'
rm /tmp/chip* ; ./scripts/run_in_python_env.sh ./out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_CGEN_2_6.py'
rm /tmp/chip* ; ./scripts/run_in_python_env.sh ./out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_CGEN_2_7.py'
rm /tmp/chip* ; ./scripts/run_in_python_env.sh ./out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_CGEN_2_8.py'
```
@swan-amazon swan-amazon deleted the branch swan-amazon:feature/enhanced-setup-flow-feature December 30, 2024 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants