-
Notifications
You must be signed in to change notification settings - Fork 2.4k
[TC-DD-3.23] Update test script to verify commissioning window #72758
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -36,7 +36,10 @@ def desc_TC_DD_3_23(self) -> str: | |||||
| def steps_TC_DD_3_23(self) -> list[TestStep]: | ||||||
| return [ | ||||||
| TestStep(1, "Detecting the NFC Tag and reading the Payload", is_commissioning=False), | ||||||
| TestStep(2, 'Validate the NFC bit in payload and Perform the commissioning') | ||||||
| TestStep(2, "Validate the NFC bit in payload and Perform the commissioning"), | ||||||
| TestStep(3, "Perform the commissioning again to check if the device is already commissioned and commissioning fails"), | ||||||
| TestStep(4, "DUT is powered OFF."), | ||||||
| TestStep(5, "Perform the commissioning again to check if the device is already commissioned and commissioning fails"), | ||||||
| ] | ||||||
|
|
||||||
| def setup_test(self): | ||||||
|
|
@@ -110,6 +113,25 @@ async def test_TC_DD_3_23(self): | |||||
| asserts.assert_false(self.unpowered_phase_complete_seen, "Stage 'UnpoweredPhaseComplete' was seen which is not expected!") | ||||||
| asserts.assert_true(self.send_complete_seen, "Stage 'send_complete_seen' was not seen!") | ||||||
|
|
||||||
| # Step 3: Perform the commissioning again to check if the device is already commissioned and commissioning fails | ||||||
| self.step(3) | ||||||
| commissioning_success = await self.commission_devices() | ||||||
| asserts.assert_false( | ||||||
| commissioning_success, | ||||||
| "Device Commissioning using nfc transport has succeeded when it should have failed" | ||||||
| ) | ||||||
|
|
||||||
| self.step(4) | ||||||
| self.wait_for_user_input(prompt_msg="Power OFF the device") | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The prompt only asks the user to "Power OFF the device". If the device remains powered off, the subsequent commissioning attempt in Step 5 will fail due to the device being offline, which does not validate the commissioning window behavior. Please update the prompt to ask the user to power cycle the device (Power OFF and then Power ON).
Suggested change
|
||||||
|
|
||||||
| # Step 5: Perform the commissioning again to check if the device is already commissioned and commissioning fails | ||||||
| self.step(5) | ||||||
| commissioning_success = await self.commission_devices() | ||||||
| asserts.assert_false( | ||||||
| commissioning_success, | ||||||
| "Device Commissioning using nfc transport has succeeded when it should have failed" | ||||||
| ) | ||||||
|
|
||||||
|
|
||||||
| if __name__ == "__main__": | ||||||
| default_matter_test_main() | ||||||
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.
The step description says "DUT is powered OFF.", but to properly test that the commissioning window remains closed after a power cycle, the DUT needs to be powered back ON before attempting commissioning in Step 5. Otherwise, the commissioning attempt in Step 5 will fail simply because the device is offline/unpowered, rather than verifying the commissioning window state. Please update this step to indicate a power cycle.