From 8b37c23293369a6927cd340c8b70bfb8deabb754 Mon Sep 17 00:00:00 2001 From: kowsisoundhar12 Date: Wed, 24 Aug 2022 20:58:03 +0530 Subject: [PATCH] Added updated Door lock scripts --- .../certification/Test_TC_DRLK_2_1.yaml | 4 +- .../certification/Test_TC_DRLK_2_10.yaml | 16 ++++ .../certification/Test_TC_DRLK_2_8.yaml | 7 ++ .../certification/Test_TC_DRLK_3_2.yaml | 5 +- .../certification/Test_TC_DRLK_3_3.yaml | 78 +++++++++++++++++++ 5 files changed, 106 insertions(+), 4 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml index b231e61023444d..709969ee58a4d8 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml @@ -1370,9 +1370,9 @@ tests: verification: | This is an Optional attribute, so its not compulsory to get the expected outcome - ./chip-tool doorlock write 40 0 1 1 + ./chip-tool doorlock write-by-id 40 0 1 1 - Verify "DUT responds with UNSUPPORTED_WRITE" on the TH(Chip-tool) Log: + Verify "DUT responds with UNSUPPORTED_ATTRIBUTE" on the TH(Chip-tool) Log: [1653637444.331118][3599:3604] CHIP:DMG: StatusIB = [1653637444.331165][3599:3604] CHIP:DMG: { diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_10.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_10.yaml index 7039726d2ab189..0ecf3c718743cc 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_10.yaml @@ -37,6 +37,22 @@ tests: 4. Open 2nd terminal of DUT and provide the below command to obtain PID of DUT ps -aef|grep lock-app 5. Follow the Verification step below to generate the event in 2nd terminal of DUT + + + Pre-Conditions + "1 TH is commissioned with the DUT + + 2 Lock device is the DUT + + Before sending the Events proceed following steps: + + 1. Send Set User Command and Get User for setting User. + + 2. Send Set Credential Command and Get Credential Status for setting PIN code. + + After sending Events with all condition proceed following step + + 1. Send Clear Credential and Clear User Command." disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_8.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_8.yaml index dbe60fa520306b..70b507eb81fcbf 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_8.yaml @@ -26,6 +26,13 @@ config: endpoint: 0 tests: + - label: "Pre-Conditions" + verification: | + 1 TH is commissioned with the DUT + + 2 Lock device is the DUT + disabled: true + - label: "TH reads NumberOfTotalUsers Supported attribute and saves for future use." diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml index e8b0fc81e46332..eae707cc6c5c68 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml @@ -29,11 +29,12 @@ tests: For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. disabled: true - - label: "Note" + - label: "Pre-Conditions" verification: | 1. TH is commissioned with the DUT - 2.Steps 4- 12 need a User added to the lock + 2.Steps 4- 12 need a User added to the + lock disabled: true - label: "DUT sends Lock Door command to TH." diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_3_3.yaml index b909f1aea6b7d7..ced573eba94550 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_3_3.yaml @@ -42,6 +42,21 @@ tests: 4. Open 2nd terminal of DUT and provide the below command to obtain PID of DUT ps -aef|grep lock-app 5. Follow the Verification step below to generate the event in 2nd terminal of DUT " + + + "Pre-Conditions + + Before sending the Events proceed following step: + + 1. Send Set User Command and Get User for setting User. + + 2. Send Set Credential Command and Get Credential Status for setting PIN code. + + After sending Events with all condition proceed following step + + 1. Send Clear Credential and Clear User Command. + + " disabled: true - label: "TH will initiate DoorLockAlarm Event (LockJammed scenario)" @@ -446,3 +461,66 @@ tests: [1658400921.175531][3227:3227] CHIP:DMG: AccessControl: allowed [1658400921.175603][3227:3227] CHIP:DMG: Fetched 3 events disabled: true + + - label: "" + verification: | + ./chip-tool doorlock clear-credential "{ "credentialType" : 1 , "credentialIndex" : 1 }" 1 1 --timedInteractionTimeoutMs 1000 + + Verify " DUT sends success response" on the TH(Lock-app) Log: + + [1657115878.582559][8804:8804] CHIP:DMG: InvokeRequestMessage = + [1657115878.582642][8804:8804] CHIP:DMG: { + [1657115878.582698][8804:8804] CHIP:DMG: suppressResponse = false, + [1657115878.582787][8804:8804] CHIP:DMG: timedRequest = true, + [1657115878.582848][8804:8804] CHIP:DMG: InvokeRequests = + [1657115878.582948][8804:8804] CHIP:DMG: [ + [1657115878.583009][8804:8804] CHIP:DMG: CommandDataIB = + [1657115878.583098][8804:8804] CHIP:DMG: { + [1657115878.583161][8804:8804] CHIP:DMG: CommandPathIB = + [1657115878.583265][8804:8804] CHIP:DMG: { + [1657115878.583366][8804:8804] CHIP:DMG: EndpointId = 0x1, + [1657115878.583607][8804:8804] CHIP:DMG: ClusterId = 0x101, + [1657115878.583724][8804:8804] CHIP:DMG: CommandId = 0x26, + [1657115878.583802][8804:8804] CHIP:DMG: }, + [1657115878.583906][8804:8804] CHIP:DMG: + [1657115878.583972][8804:8804] CHIP:DMG: CommandFields = + [1657115878.584068][8804:8804] CHIP:DMG: { + [1657115878.584155][8804:8804] CHIP:DMG: 0x0 = + [1657115878.584234][8804:8804] CHIP:DMG: { + [1657115878.584335][8804:8804] CHIP:DMG: 0x0 = 1, + [1657115878.584442][8804:8804] CHIP:DMG: 0x1 = 1, + [1657115878.584527][8804:8804] CHIP:DMG: }, + [1657115878.584624][8804:8804] CHIP:DMG: }, + [1657115878.584695][8804:8804] CHIP:DMG: }, + [1657115878.584795][8804:8804] CHIP:DMG: + [1657115878.584890][8804:8804] CHIP:DMG: ], + [1657115878.584994][8804:8804] CHIP:DMG: + [1657115878.585054][8804:8804] CHIP:DMG: InteractionModelRevision = 1 + [1657115878.585131][8804:8804] CHIP:DMG: }, + [1657115878.585305][8804:8804] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a + [1657115878.585416][8804:8804] CHIP:DMG: AccessControl: allowed + + ./chip-tool doorlock clear-user 1 1 1 --timedInteractionTimeoutMs 1000 + + Verify " DUT sends success response" on the TH(Lock-app) Log: + + [1658399465.849095][2474:2474] CHIP:DMG: CommandPathIB = + [1658399465.849133][2474:2474] CHIP:DMG: { + [1658399465.849169][2474:2474] CHIP:DMG: EndpointId = 0x1, + [1658399465.849208][2474:2474] CHIP:DMG: ClusterId = 0x101, + [1658399465.849245][2474:2474] CHIP:DMG: CommandId = 0x1d, + [1658399465.849279][2474:2474] CHIP:DMG: }, + [1658399465.849316][2474:2474] CHIP:DMG: + [1658399465.849348][2474:2474] CHIP:DMG: CommandFields = + [1658399465.849386][2474:2474] CHIP:DMG: { + [1658399465.849422][2474:2474] CHIP:DMG: 0x0 = 2, + [1658399465.849459][2474:2474] CHIP:DMG: }, + [1658399465.849491][2474:2474] CHIP:DMG: }, + [1658399465.849528][2474:2474] CHIP:DMG: + [1658399465.849555][2474:2474] CHIP:DMG: ], + [1658399465.849589][2474:2474] CHIP:DMG: + [1658399465.849616][2474:2474] CHIP:DMG: InteractionModelRevision = 1 + [1658399465.849643][2474:2474] CHIP:DMG: }, + [1658399465.849717][2474:2474] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0101 e=1 p=a + [1658399465.849757][2474:2474] CHIP:DMG: AccessControl: allowed + disabled: true