-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
Copy pathTest_TC_ICDM_3_4.yaml
201 lines (182 loc) · 6.65 KB
/
Test_TC_ICDM_3_4.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# Copyright (c) 2024 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: 217.1.6. [TC-ICDM-3.4] ICDCounter persistence with DUT as Server
PICS:
- ICDM.S
config:
nodeId: 0x12344321
cluster: "ICD Management"
endpoint: 0
CheckInNodeID1:
type: node_id
defaultValue: 1
MonitorSubID1:
type: subject-id
defaultValue: 2
Key1:
type: octstr
defaultValue: "hex:1234567890abcdef1234567890abcdef"
IdleModedurationValue:
type: int16u
defaultValue: 5
tests:
- label:
"Precondition: Commission DUT to TH (can be skipped if done in a
preceding test)"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId
- label:
"Precondition: TH reads the RegisteredClients attribute from the DUT"
PICS: ICDM.S.A0003
command: "readAttribute"
attribute: "RegisteredClients"
response:
saveAs: RegisteredClientsIDs
constraints:
type: list
- label:
"Precondition: If list of registered clients is not empty, unregister
existing client(s)"
verification: |
Please send the 'unregister client' command using the check-in nodeID received from the previous read
./chip-tool icdmanagement unregister-client 112233 1 0
[1704888949.629057][71657:71659] CHIP:DMG:
[1704888949.629066][71657:71659] CHIP:DMG: InteractionModelRevision = 11
[1704888949.629074][71657:71659] CHIP:DMG: },
[1704888949.629125][71657:71659] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_0046 Command=0x0000_0002 Status=0x0
[1704888949.629153][71657:71659] CHIP:DMG: ICR moving to [AwaitingDe]
cluster: "LogCommands"
command: "UserPrompt"
PICS: PICS_USER_PROMPT && ICDM.S.C02.Rsp
arguments:
values:
- name: "message"
value: "Please enter 'y' for success"
- name: "expectedValue"
value: "y"
- label:
"Precondition: TH reads from the DUT the RegisteredClients attribute.
Verify that the DUT response contains empty list of registered
clients."
PICS: ICDM.S.A0003 && PICS_USER_PROMPT
command: "readAttribute"
attribute: "RegisteredClients"
response:
value: []
constraints:
type: list
- label: "Step 1: TH reads from the DUT the IdleModeDuration attribute"
PICS: ICDM.S.A0000
command: "readAttribute"
attribute: "IdleModeDuration"
response:
saveAs: IdleModeDuration1
constraints:
type: int32u
minValue: 1
maxValue: 64800
- label: "Step 2: TH reads from the DUT the ICDCounter attribute."
PICS: ICDM.S.A0004
command: "readAttribute"
attribute: "ICDCounter"
response:
saveAs: ICDCounter1
constraints:
type: int32u
minValue: 0
maxValue: 4294967295
- label:
"Step 3a & 3b: TH sends RegisterClient command. - CheckInNodeID:
registering clients node ID (CheckInNodeID1) - MonitoredSubject:
monitored subject ID (MonitorSubID1) - Key: shared secret between the
client and the ICD (Key1). Verify DUT responds w/ status
SUCCESS(0x00); Verify that the DUT response contains IcdCounter1"
PICS: ICDM.S.C00.Rsp && ICDM.S.C01.Tx
command: "RegisterClient"
arguments:
values:
- name: "CheckInNodeID"
value: CheckInNodeID1
- name: "MonitoredSubject"
value: MonitorSubID1
- name: "Key"
value: Key1
# Adding input for the test to pass for now - Full test script needs to be updated
- name: "ClientType"
value: ClientTypeEnum.Permanent
response:
values:
- name: "ICDCounter"
value: ICDCounter1
constraints:
type: int32u
- label: "Step 4: Wait for 1 or more Idle Mode duration."
cluster: "DelayCommands"
command: "WaitForMs"
arguments:
values:
- name: "ms"
value: ( IdleModedurationValue * 1000 )
#Issue https://github.com/project-chip/connectedhomeip/issues/31297
- label: "Step 5: TH reads from the DUT the ICDCounter attribute."
verification: |
./chip-tool icdmanagement read icdcounter 1 0
[1702421000.635860][1431:1433] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0046 Attribute 0x0000_0004 DataVersion: 2255930497
[1702421000.635970][1431:1433] CHIP:TOO: ICDCounter: 1706188496
cluster: "LogCommands"
command: "UserPrompt"
PICS: PICS_USER_PROMPT && ICDM.S.A0004
arguments:
values:
- name: "message"
value: "Please enter 'y' for success"
- name: "expectedValue"
value: "y"
- label: "Step 6: Reboot DUT"
PICS: PICS_SDK_CI_ONLY
cluster: "SystemCommands"
endpoint: 0
command: "Reboot"
- label: "Step Reboot target device(DUT)"
verification: |
Did the DUT successfully reboot?
cluster: "LogCommands"
command: "UserPrompt"
PICS: PICS_SKIP_SAMPLE_APP
arguments:
values:
- name: "message"
value: "Please reboot the DUT and enter 'y' after DUT starts"
- name: "expectedValue"
value: "y"
- label: "Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId
- label: "Step 7: TH reads from the DUT the ICDCounter attribute."
PICS: ICDM.S.A0004 && PICS_USER_PROMPT
command: "readAttribute"
attribute: "ICDCounter"
response:
constraints:
type: int32u
minValue: ICDCounter2
maxValue: 4294967295