| # Copyright (c) 2021 Project CHIP Authors |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| name: |
| 111.2.9. [TC-DRLK-2.9] Verification for the following Commands - Set |
| Credential , Set Credential Response, Get Credential Status, Get Credential |
| Status Response, Clear Credential [DUT-Server] |
| |
| PICS: |
| - DRLK.S |
| |
| config: |
| nodeId: 0x12344321 |
| cluster: "Door Lock" |
| endpoint: 1 |
| |
| tests: |
| - label: "Wait for the commissioned device to be retrieved" |
| cluster: "DelayCommands" |
| command: "WaitForCommissionee" |
| arguments: |
| values: |
| - name: "nodeId" |
| value: nodeId |
| |
| - label: "Precondition: Create new user with default parameters" |
| command: "SetUser" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "OperationType" |
| value: 0 |
| - name: "UserIndex" |
| value: 1 |
| - name: "UserName" |
| value: "xxx" |
| - name: "UserUniqueID" |
| value: 6452 |
| - name: "UserStatus" |
| value: 1 |
| - name: "UserType" |
| value: 0 |
| - name: "CredentialRule" |
| value: 0 |
| |
| - label: "Precondition: Read the user back and verify its fields" |
| command: "GetUser" |
| arguments: |
| values: |
| - name: "UserIndex" |
| value: 1 |
| response: |
| values: |
| - name: "UserIndex" |
| value: 1 |
| - name: "UserName" |
| value: "xxx" |
| - name: "UserUniqueID" |
| value: 6452 |
| - name: "UserStatus" |
| value: 1 |
| - name: "UserType" |
| value: 0 |
| - name: "CredentialRule" |
| value: 0 |
| - name: "Credentials" |
| value: [] |
| - name: "CreatorFabricIndex" |
| value: 1 |
| - name: "LastModifiedFabricIndex" |
| value: 1 |
| - name: "NextUserIndex" |
| value: null |
| |
| - label: |
| "Step 1: TH reads NumberOfTotalUsersSupported attribute and saves for |
| future use." |
| PICS: DRLK.S.F08 && DRLK.S.A0011 |
| command: "readAttribute" |
| attribute: "NumberOfTotalUsersSupported" |
| response: |
| saveAs: NumberOfTotalUsersSupportedValue |
| constraints: |
| minValue: 0 |
| maxValue: 65534 |
| |
| - label: |
| "Step 2: TH sends Set Credential Command to DUT with the following |
| fields a)OperationType as 0 b)Credential as 1 1 c)CredentialData as |
| 123456 d)UserIndex as 1 e)UserStatus as null f)UserType as null" |
| PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx |
| command: "SetCredential" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "OperationType" |
| value: 0 |
| - name: "Credential" |
| value: { CredentialType: 1, CredentialIndex: 1 } |
| - name: "CredentialData" |
| value: "123456" |
| - name: "UserIndex" |
| value: 1 |
| - name: "UserStatus" |
| value: null |
| - name: "UserType" |
| value: null |
| response: |
| values: |
| - name: "Status" |
| value: 0 |
| - name: "UserIndex" |
| value: null |
| - name: "NextCredentialIndex" |
| value: 2 |
| |
| - label: |
| "Step 3: TH sends Get Credential Status Command with a)CredentialType |
| as 1 b)CredentialIndex as 1" |
| PICS: DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx |
| command: "GetCredentialStatus" |
| arguments: |
| values: |
| - name: "Credential" |
| value: { CredentialType: 1, CredentialIndex: 1 } |
| response: |
| values: |
| - name: "CredentialExists" |
| constraints: |
| type: boolean |
| - name: "UserIndex" |
| value: 1 |
| - name: "CreatorFabricIndex" |
| value: 1 |
| - name: "LastModifiedFabricIndex" |
| value: 1 |
| - name: "NextCredentialIndex" |
| value: null |
| |
| - label: |
| "Step 4: TH sends Set Credential Command to DUT with the following |
| fields a)OperationType as 0 b)Credential as 1 2 C)CredentialData as |
| 4321 D)UserIndex as null e)UserStatus as 5(Invalid value) f)UserType |
| as 10(Invalid value)" |
| PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx |
| command: "SetCredential" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "OperationType" |
| value: 0 |
| - name: "Credential" |
| value: { CredentialType: 1, CredentialIndex: 2 } |
| - name: "CredentialData" |
| value: "4321" |
| - name: "UserIndex" |
| value: null |
| - name: "UserStatus" |
| value: UserStatusEnum.UnknownEnumValue(5) |
| - name: "UserType" |
| value: 10 |
| response: |
| values: |
| - name: "Status" |
| value: 0x85 |
| - name: "UserIndex" |
| value: null |
| |
| - label: |
| "Step 5: TH sends Set Credential Command to DUT with the following |
| fields a)OperationType as 0 b)Credential as 1 2 d)CredentialData as |
| 123456 (same as step 2) e)UserIndex as null f)UserStatus as null |
| g)UserType as null" |
| PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx |
| command: "SetCredential" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "OperationType" |
| value: 0 |
| - name: "Credential" |
| value: { CredentialType: 1, CredentialIndex: 2 } |
| - name: "CredentialData" |
| value: "123456" |
| - name: "UserIndex" |
| value: null |
| - name: "UserStatus" |
| value: null |
| - name: "UserType" |
| value: null |
| response: |
| values: |
| - name: "Status" |
| value: 0x02 |
| - name: "UserIndex" |
| value: null |
| |
| - label: |
| "Step 6a: TH sends Set Credential Command to DUT with the following |
| fields a)OperationType as 0 b)Credential as 1 1 (same as step 2) |
| c)CredentialData as 123456 d)UserIndex as 1 e)UserStatus as null |
| f)UserType as null" |
| PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx |
| command: "SetCredential" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "OperationType" |
| value: 0 |
| - name: "Credential" |
| value: { CredentialType: 1, CredentialIndex: 1 } |
| - name: "CredentialData" |
| value: "123456" |
| - name: "UserIndex" |
| value: 1 |
| - name: "UserStatus" |
| value: null |
| - name: "UserType" |
| value: null |
| response: |
| values: |
| - name: "Status" |
| constraints: |
| anyOf: [0x2, 0x3] |
| |
| - label: |
| "Step 6b: TH sends Set Credential Command to DUT with the following |
| fields: a)OperationType as 0 b)Credential as 1 1 (same as step 2) |
| c)CredentialData as 123457 d)UserIndex as 1 e)UserStatus as null |
| f)UserType as null" |
| PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx |
| command: "SetCredential" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "OperationType" |
| value: 0 |
| - name: "Credential" |
| value: { CredentialType: 1, CredentialIndex: 1 } |
| - name: "CredentialData" |
| value: "123457" |
| - name: "UserIndex" |
| value: 1 |
| - name: "UserStatus" |
| value: null |
| - name: "UserType" |
| value: null |
| response: |
| values: |
| - name: "Status" |
| constraints: |
| anyOf: [0x2, 0x3] |
| |
| - label: |
| "Step 7: TH sends Set Credential Command to DUT with the following |
| fields: a)OperationType as 2 b)Credential as 1 3 c)CredentialData as |
| 1234567 d)UserIndex as 1 e)UserStatus as null f)UserType as null" |
| PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx |
| command: "SetCredential" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "OperationType" |
| value: 2 |
| - name: "Credential" |
| value: { CredentialType: 1, CredentialIndex: 3 } |
| - name: "CredentialData" |
| value: "1234567" |
| - name: "UserIndex" |
| value: 1 |
| - name: "UserStatus" |
| value: null |
| - name: "UserType" |
| value: null |
| response: |
| values: |
| - name: "Status" |
| value: 0x85 |
| |
| - label: |
| "Step 8: TH sends Clear Credential Command to DUT with the following |
| fields: a)CredentialType as 1 b)CredentialIndex as 1" |
| PICS: DRLK.S.F08 && DRLK.S.C26.Rsp |
| command: "ClearCredential" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "Credential" |
| value: { CredentialType: 1, CredentialIndex: 1 } |
| |
| - label: |
| "Step 9: TH sends Get Credential command to DUT with the following |
| fields: a)CredentialType as 1 b)CredentialIndex as 1" |
| PICS: DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx |
| command: "GetCredentialStatus" |
| arguments: |
| values: |
| - name: "Credential" |
| value: { CredentialType: 1, CredentialIndex: 1 } |
| response: |
| values: |
| - name: "CredentialExists" |
| value: false |
| - name: "UserIndex" |
| value: null |
| - name: "CreatorFabricIndex" |
| value: null |
| - name: "LastModifiedFabricIndex" |
| value: null |
| - name: "NextCredentialIndex" |
| value: null |
| |
| - label: |
| "Step 10: TH sends Set User Command to DUT with the following values: |
| a)OperationType as 0 b)UserIndex as 2 c)UserName as xxx d)UserUniqueID |
| as 6452 e)UserStatus as 1 f)UserType as 0 g)CredentialRule as 0" |
| PICS: DRLK.S.F08 && DRLK.S.C1a.Rsp |
| command: "SetUser" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "OperationType" |
| value: 0 |
| - name: "UserIndex" |
| value: 2 |
| - name: "UserName" |
| value: "xxx" |
| - name: "UserUniqueID" |
| value: "6452" |
| - name: "UserStatus" |
| value: 1 |
| - name: "UserType" |
| value: 0 |
| - name: "CredentialRule" |
| value: 0 |
| |
| - label: |
| "Step 11: TH sends Set Credential Command to DUT with the following |
| fields: a)OperationType as 0 b)Credential as 1 1 c)CredentialData as |
| 123456 d)UserIndex as 2 e)UserStatus as null f)UserType as null" |
| PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx |
| command: "SetCredential" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "OperationType" |
| value: 0 |
| - name: "Credential" |
| value: { CredentialType: 1, CredentialIndex: 1 } |
| - name: "CredentialData" |
| value: "123456" |
| - name: "UserIndex" |
| value: 2 |
| - name: "UserStatus" |
| value: null |
| - name: "UserType" |
| value: null |
| response: |
| values: |
| - name: "Status" |
| value: 0 |
| - name: "UserIndex" |
| value: null |
| |
| - label: |
| "Step 12a: TH sends Clear Credential Command to DUT with the following |
| fields: a)CredentialType as 1 b)CredentialIndex as 0xFFFE" |
| PICS: DRLK.S.F08 && DRLK.S.C26.Rsp |
| command: "ClearCredential" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "Credential" |
| value: { CredentialType: 1, CredentialIndex: 65534 } |
| |
| - label: |
| "Step 12b: TH sends Get Credential command to DUT with the following |
| fields: a)CredentialType as 1 b)CredentialIndex as 0xFFFE" |
| PICS: DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx |
| command: "GetCredentialStatus" |
| arguments: |
| values: |
| - name: "Credential" |
| value: { CredentialType: 1, CredentialIndex: 65534 } |
| response: |
| values: |
| - name: "CredentialExists" |
| value: false |
| - name: "UserIndex" |
| value: null |
| - name: "CreatorFabricIndex" |
| value: null |
| - name: "LastModifiedFabricIndex" |
| value: null |
| - name: "NextCredentialIndex" |
| value: null |
| |
| - label: |
| "Step 13: TH sends Get Credential Status Command with a)CredentialType |
| as 1 b)CredentialIndex as 1" |
| PICS: DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx |
| command: "GetCredentialStatus" |
| arguments: |
| values: |
| - name: "Credential" |
| value: { CredentialType: 1, CredentialIndex: 1 } |
| response: |
| values: |
| - name: "CredentialExists" |
| value: false |
| - name: "UserIndex" |
| value: null |
| - name: "CreatorFabricIndex" |
| value: null |
| - name: "LastModifiedFabricIndex" |
| value: null |
| - name: "NextCredentialIndex" |
| value: null |
| |
| - label: |
| "Step 14: TH sends Clear Credential Command to DUT with the following |
| fields: a)CredentialType as 8(Invalid value) b)CredentialIndex as 2" |
| PICS: DRLK.S.F08 && DRLK.S.C26.Rsp |
| command: "ClearCredential" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "Credential" |
| value: { CredentialType: 8, CredentialIndex: 2 } |
| response: |
| error: INVALID_COMMAND |
| |
| - label: "Cleanup the first created user" |
| command: "ClearUser" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "UserIndex" |
| value: 1 |
| |
| - label: "Cleanup the second created user" |
| command: "ClearUser" |
| timedInteractionTimeoutMs: 10000 |
| arguments: |
| values: |
| - name: "UserIndex" |
| value: 2 |