Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion src/python_testing/TC_DD_3_23.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Suggested change
TestStep(4, "DUT is powered OFF."),
TestStep(4, "Power cycle the DUT (Power OFF, then Power ON)."),

TestStep(5, "Perform the commissioning again to check if the device is already commissioned and commissioning fails"),
]

def setup_test(self):
Expand Down Expand Up @@ -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")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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
self.wait_for_user_input(prompt_msg="Power OFF the device")
self.wait_for_user_input(prompt_msg="Power cycle the DUT (Power OFF, then Power ON)")


# 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()
Loading