diff --git a/src/python_testing/TC_DD_3_23.py b/src/python_testing/TC_DD_3_23.py index 7d81679d3f3c08..b6db633816612a 100644 --- a/src/python_testing/TC_DD_3_23.py +++ b/src/python_testing/TC_DD_3_23.py @@ -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") + + # 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()