From d02787514a277cdbe47e4f0da8737821a50ac29c Mon Sep 17 00:00:00 2001 From: dengpan-liu Date: Fri, 26 Jun 2026 17:49:12 +0800 Subject: [PATCH 1/2] update test script to verify commissioning window --- src/python_testing/TC_DD_3_23.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/python_testing/TC_DD_3_23.py b/src/python_testing/TC_DD_3_23.py index 7d81679d3f3c08..920d546ae560e9 100644 --- a/src/python_testing/TC_DD_3_23.py +++ b/src/python_testing/TC_DD_3_23.py @@ -36,7 +36,9 @@ 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, "Perform the commissioning again to check if the device is already commissioned and commissioning fails"), ] def setup_test(self): @@ -110,6 +112,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") + + # 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() From 1ba50dec0d4638dd01c83bc71badea1b95177d00 Mon Sep 17 00:00:00 2001 From: dengpan-liu Date: Fri, 26 Jun 2026 22:43:17 +0800 Subject: [PATCH 2/2] update TestSteps --- src/python_testing/TC_DD_3_23.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/python_testing/TC_DD_3_23.py b/src/python_testing/TC_DD_3_23.py index 920d546ae560e9..b6db633816612a 100644 --- a/src/python_testing/TC_DD_3_23.py +++ b/src/python_testing/TC_DD_3_23.py @@ -38,7 +38,8 @@ def steps_TC_DD_3_23(self) -> list[TestStep]: 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(3, "Perform the commissioning again to check if the device is already commissioned and commissioning fails"), - TestStep(4, "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):