blob: f0e9c1dea26fe84e6debc50894a6e9c0f596e932 [file] [log] [blame]
# 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: "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: "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: null
- name: "creatorFabricIndex"
value: 1
- name: "lastModifiedFabricIndex"
value: 1
- name: "nextUserIndex"
value: null
- label:
"TH reads NumberOfTotalUsersSupported attribute and saves for future
use."
PICS: DRLK.C.F08 && DRLK.S.A0011
command: "readAttribute"
attribute: "NumberOfTotalUsersSupported"
response:
saveAs: NumberOfTotalUsersSupported
constraints:
minValue: 0
maxValue: 65534
- label: "TH sends Set Credential Command to DUT"
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: "TH sends Get Credential Status Command"
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: "TH sends Set Credential Command to DUT"
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: 2
- name: "userStatus"
value: 5
- name: "userType"
value: 10
response:
values:
- name: "status"
value: 0x85
- name: "userIndex"
value: null
- name: "nextCredentialIndex"
value: 3
- label: "TH sends Set Credential Command to DUT"
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: 2
- name: "userStatus"
value: null
- name: "userType"
value: null
response:
values:
- name: "status"
value: 0x02
- name: "userIndex"
value: null
- name: "nextCredentialIndex"
value: 3
#Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed.
- label: "TH sends Set Credential Command to DUT"
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: 0x02
- name: "userIndex"
value: null
- name: "nextCredentialIndex"
value: 2
#Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed.
- label:
"TH sends Set Credential Command to DUT and Verify that the DUT sends
Set Credential Response command with response as OCCUPIED if the
CredentialIndex is repeated"
verification: |
./chip-tool doorlock set-credential 0 '{ "credentialType" : 1, "credentialIndex" : 1 }' 123456 2 0 0 1 1 --timedInteractionTimeoutMs 1000
[1656506733.767451][27276:27281] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0023
[1656506733.767542][27276:27281] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0023
[1656506733.767663][27276:27281] CHIP:TOO: SetCredentialResponse: {
[1656506733.767731][27276:27281] CHIP:TOO: status: 2
[1656506733.767779][27276:27281] CHIP:TOO: userIndex: null
[1656506733.767826][27276:27281] CHIP:TOO: nextCredentialIndex: 2
[1656506733.767871][27276:27281] CHIP:TOO: }
cluster: "LogCommands"
command: "UserPrompt"
PICS: PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx
arguments:
values:
- name: "message"
value: "Please enter 'y' for success"
- name: "expectedValue"
value: "y"
#Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed.
- label: "TH sends Set Credential Command to DUT"
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: 3 }
- name: "credentialData"
value: "123456"
- name: "userIndex"
value: 3
- name: "userStatus"
value: null
- name: "userType"
value: null
response:
values:
- name: "status"
value: 0x02
- name: "userIndex"
value: null
- name: "nextCredentialIndex"
value: 4
#Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed.
- label:
"TH sends Set Credential Command to DUT and Verify that the DUT sends
Set Credential Response command with response as OCCUPIED if the
CredentialIndex is repeated"
verification: |
./chip-tool doorlock set-credential 0 '{ "credentialType" : 1, "credentialIndex" : 3 }' 123456 3 0 0 1 1 --timedInteractionTimeoutMs 1000
[1656506733.767451][27276:27281] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0023
[1656506733.767542][27276:27281] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0023
[1656506733.767663][27276:27281] CHIP:TOO: SetCredentialResponse: {
[1656506733.767731][27276:27281] CHIP:TOO: status: 2
[1656506733.767779][27276:27281] CHIP:TOO: userIndex: null
[1656506733.767826][27276:27281] CHIP:TOO: nextCredentialIndex: 4
[1656506733.767871][27276:27281] CHIP:TOO: }
cluster: "LogCommands"
command: "UserPrompt"
PICS: PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx
arguments:
values:
- name: "message"
value: "Please enter 'y' for success"
- name: "expectedValue"
value: "y"
#Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed.
- label: "TH sends Set Credential Command to DUT"
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: "123456"
- name: "userIndex"
value: 2
- name: "userStatus"
value: null
- name: "userType"
value: null
response:
values:
- name: "status"
value: 0x02
- name: "userIndex"
value: null
- name: "nextCredentialIndex"
value: 4
#Issue 19990 expected response OCCUPIED, but CHIP Tool Verification Steps shows status: 2 fix script once the issue is fixed.
- label:
"TH sends Set Credential Command to DUT and Verify that the DUT sends
Set Credential Response command with response as OCCUPIED if the
CredentialIndex is repeated"
verification: |
./chip-tool doorlock set-credential 0 '{ "credentialType" : 1, "credentialIndex" : 3 }' 123456 2 0 0 1 1 --timedInteractionTimeoutMs 1000
[1656506733.767451][27276:27281] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0023
[1656506733.767542][27276:27281] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0023
[1656506733.767663][27276:27281] CHIP:TOO: SetCredentialResponse: {
[1656506733.767731][27276:27281] CHIP:TOO: status: 2
[1656506733.767779][27276:27281] CHIP:TOO: userIndex: null
[1656506733.767826][27276:27281] CHIP:TOO: nextCredentialIndex: 4
[1656506733.767871][27276:27281] CHIP:TOO: }
cluster: "LogCommands"
command: "UserPrompt"
PICS: PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx
arguments:
values:
- name: "message"
value: "Please enter 'y' for success"
- name: "expectedValue"
value: "y"
- label: "TH sends Clear Credential Command to DUT"
PICS: DRLK.S.F08 && DRLK.S.C26.Rsp
command: "ClearCredential"
timedInteractionTimeoutMs: 10000
arguments:
values:
- name: "credential"
value: { CredentialType: 1, CredentialIndex: 1 }
- label: "TH sends Get Credential Status Command to DUT"
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: "TH sends Set User Command to DUT"
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: "TH sends Set Credential Command to DUT"
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
- name: "nextCredentialIndex"
value: 2
- label: "TH sends Clear Credential Command to DUT"
PICS: DRLK.S.F08 && DRLK.S.C26.Rsp
command: "ClearCredential"
timedInteractionTimeoutMs: 10000
arguments:
values:
- name: "credential"
value: { CredentialType: 1, CredentialIndex: 65534 }
- label: "TH sends Get Credential Status Command"
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: "TH sends Get Credential Status Command"
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: "TH sends Clear Credential Command to DUT"
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