-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[Closures] Add CLCTRL test scripts #39015
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
Conversation
PR #39015: Size comparison from 2ed64bc to 72ef179 Full report (3 builds for cc32xx, stm32)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds the initial ClosureControl test script to validate calibrate, move-to, and stop commands on the device under test.
- Implements TC_CLCTRL_3_1.py covering calibration sequences, state reads, and MoveTo/Calibrate invalid-in-state checks.
- Consolidates setup, attribute reads, and command interactions into a single async test.
Comments suppressed due to low confidence (1)
src/python_testing/TC_CLCTRL_3_1.py:36
- The code uses sleep, InteractionModelError, and Status but they are not imported. Add the necessary imports (e.g.,
from time import sleep
,from chip.interaction_model import InteractionModelError, Status
) to avoid NameError.
import chip.testing.matter_testing as MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches
PR #39015: Size comparison from d2faf76 to df47cae Full report (3 builds for cc32xx, stm32)
|
PR #39015: Size comparison from 41c7192 to e8fc74a Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, 8000 telink, tizen)
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
PR #39015: Size comparison from 02d5c4a to 5149542 Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few things as discussed in huddle
Co-authored-by: Fabian Wechselberger <94078875+fabian-imig@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more comments
PR #39015: Size comparison from 02d5c4a to d8df1f0 Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #39015: Size comparison from 02d5c4a to 454edfc Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test Plan is in a good state. My main comments are :
- There seems to be alot of redundant checks that have been validated before or can be validated once and not everytime.
- There are a lot of repeated operations that can be moved into a utility function like the command validation for the IM error
- LatchControlMode checks can be simplfied to simplify the understand either with a utility function or by using the generated enums.
PR #39015: Size comparison from 2090a65 to 737fcf7 Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #39015: Size comparison from 050f895 to a554633 Full report (52 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #39015: Size comparison from 2f03cfa to ebcb97d Full report (45 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, nrfconnect, psoc6, qpg, stm32, telink, tizen)
|
PR #39015: Size comparison from 12de44c to aeba1b3 Full report (67 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
* Add new test scripts for CLCTRL * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Modify test scripts by testplan spec changes * Change none check in the scripts * Restyled by isort * Exclude test scripts for CI * Remove unused code * Change scipts for fixing testing errors * Change steps for instantaneous by closure meeting discussion * Minor changes * Fix script bugs by renaming * Restyled by prettier-yaml * Apply suggestions from code review Co-authored-by: Søren Møller Rasmussen <126240309+sorenmr@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Søren Møller Rasmussen <126240309+sorenmr@users.noreply.github.com> * Change script by review comments * Apply suggestions from code review Co-authored-by: Søren Møller Rasmussen <126240309+sorenmr@users.noreply.github.com> * Modify scripts for commit change of Commit a214010 * Restyled by whitespace * Restyled by isort * Apply suggestions from code review Co-authored-by: Fabian Wechselberger <94078875+fabian-imig@users.noreply.github.com> * Changes by PR review * Changes from review comments --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: Søren Møller Rasmussen <126240309+sorenmr@users.noreply.github.com> Co-authored-by: Ali Taleb <97682370+AliTalebVelux@users.noreply.github.com> Co-authored-by: Fabian Wechselberger <94078875+fabian-imig@users.noreply.github.com>
Contains the test scripts for the ClosureControl test cases.
Initial commit is a consolidation of previous PRs.
TC_CLCTRL_3_1.py
Verifies the calibrating functionality of the Calibrate command.
TC_CLCTRL_4_1.py
Verifies the positioning functionality of the MoveTo command of the closure control cluster. Test sends MoveTo command with position and speed field. It is verified that DUT accepts the request, and that the OverallTarget and OverallState attributes are updated accordingly.
TC_CLCTRL_5_1.py
Verifies the stop functionality of the Stop command.
TC_CLCTRL_6_1.py
Verifies that the DUT as server sends the expected events when a state of the device changes.
Testing
Executing scripts against closure-app: