-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
219d8eb
commit 49061ac
Showing
2 changed files
with
385 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
384 changes: 384 additions & 0 deletions
384
src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,384 @@ | ||
# Copyright (c) 2021-2023 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: 3.1.2. [TC-IDM-1.2] Invoke Response Action from DUT to TH - [{DUT_Server}] | ||
|
||
PICS: | ||
- MCORE.IDM.S | ||
|
||
config: | ||
nodeId: 0x12344321 | ||
InvokeRequestMessage.Cluster: 0x00000006 # OnOff | ||
InvokeRequestMessage.Command: 0x00000000 # Off | ||
InvokeRequestMessage.EndPoint: 1 | ||
InvokeRequestMessage.Payload: {} | ||
|
||
tests: | ||
- label: "Wait for the commissioned device to be retrieved" | ||
cluster: "DelayCommands" | ||
command: "WaitForCommissionee" | ||
arguments: | ||
values: | ||
- name: "nodeId" | ||
value: nodeId | ||
|
||
#### Test Setup | ||
|
||
- label: "Get the list of available endpoints on the device" | ||
cluster: "Descriptor" | ||
command: "readAttribute" | ||
attribute: "PartsList" | ||
endpoint: 0 | ||
saveResponseAs: AvailableDeviceEndPoints | ||
|
||
- label: | ||
"Get an unsupported endpoint id from the list of available device | ||
endpoints" | ||
cluster: WildcardResponseExtractorCluster | ||
command: GetUnsupportedEndPoint | ||
arguments: | ||
values: | ||
- name: Value | ||
value: AvailableDeviceEndPoints | ||
response: | ||
values: | ||
- name: UnsupportedEndPoint | ||
saveAs: PIXIT.IDM.UnsupportedEndPoint | ||
|
||
- label: "Get the list of available clusters on the device (all endpoints)" | ||
cluster: "Descriptor" | ||
command: "readAttribute" | ||
attribute: "ServerList" | ||
endpoint: "*" | ||
saveResponseAs: AvailableDeviceClusters | ||
|
||
- label: | ||
"Extract the endpoint values for the AccessControl, | ||
GeneralCommissioning, AdministratorCommissioning and | ||
OperationalCredentials cluster" | ||
cluster: WildcardResponseExtractorCluster | ||
command: GetDefaultEndPointForClusters | ||
arguments: | ||
values: | ||
- name: Value | ||
value: AvailableDeviceClusters | ||
- name: Clusters | ||
value: | ||
[ | ||
"AccessControl", | ||
"GeneralCommissioning", | ||
"AdministratorCommissioning", | ||
"OperationalCredentials", | ||
] | ||
response: | ||
values: | ||
- name: AccessControl | ||
saveAs: PIXIT.Cluster.AccessControl.EndPoint | ||
- name: GeneralCommissioning | ||
saveAs: PIXIT.Cluster.GeneralCommissioning.EndPoint | ||
- name: AdministratorCommissioning | ||
saveAs: PIXIT.Cluster.AdministratorCommissioning.EndPoint | ||
- name: OperationalCredentials | ||
saveAs: PIXIT.Cluster.OperationalCredentials.EndPoint | ||
|
||
- label: | ||
"Get an unsupported cluster id from the list of available device | ||
clusters" | ||
cluster: WildcardResponseExtractorCluster | ||
command: GetUnsupportedCluster | ||
arguments: | ||
values: | ||
- name: Value | ||
value: AvailableDeviceClusters | ||
response: | ||
values: | ||
- name: UnsupportedCluster | ||
saveAs: PIXIT.IDM.UnsupportedCluster | ||
|
||
- label: | ||
"Get the list of available cluster commands on the device (all | ||
endpoints)" | ||
cluster: "AnyCommands" | ||
command: "ReadById" | ||
endpoint: "*" | ||
arguments: | ||
values: | ||
- name: "ClusterId" | ||
value: "*" | ||
- name: "AttributeId" | ||
value: 0x0000FFF9 | ||
saveResponseAs: AvailableDeviceCommands | ||
|
||
- label: | ||
"Get an unsupported command id from the list of available device | ||
commands" | ||
cluster: WildcardResponseExtractorCluster | ||
command: GetUnsupportedCommand | ||
arguments: | ||
values: | ||
- name: Value | ||
value: AvailableDeviceCommands | ||
response: | ||
values: | ||
- name: UnsupportedCommand | ||
saveAs: PIXIT.IDM.UnsupportedCommand | ||
|
||
- label: "Read the fabric index from the alpha fabric" | ||
cluster: "Operational Credentials" | ||
command: "readAttribute" | ||
endpoint: PIXIT.Cluster.OperationalCredentials.EndPoint | ||
attribute: "CurrentFabricIndex" | ||
response: | ||
saveAs: alphaIndex | ||
|
||
- label: "Read the commissioner node ID from the alpha fabric" | ||
cluster: "CommissionerCommands" | ||
command: "GetCommissionerNodeId" | ||
response: | ||
values: | ||
- name: "nodeId" | ||
saveAs: commissionerNodeIdAlpha | ||
|
||
##### Test Implementation | ||
|
||
- label: | ||
"TH sends the Invoke Request Message to the DUT with the path that | ||
indicates a specific endpoint that is unsupported." | ||
cluster: "AnyCommands" | ||
command: "CommandById" | ||
endpoint: PIXIT.IDM.UnsupportedEndPoint | ||
arguments: | ||
values: | ||
- name: "ClusterId" | ||
value: InvokeRequestMessage.Cluster | ||
- name: "CommandId" | ||
value: InvokeRequestMessage.Command | ||
- name: "Payload" | ||
value: InvokeRequestMessage.Payload | ||
response: | ||
error: UNSUPPORTED_ENDPOINT | ||
|
||
- label: | ||
"TH sends the Invoke Request Message to the DUT with the path that | ||
indicates a specific cluster that is unsupported." | ||
cluster: "AnyCommands" | ||
command: "CommandById" | ||
endpoint: InvokeRequestMessage.EndPoint | ||
arguments: | ||
values: | ||
- name: "ClusterId" | ||
value: PIXIT.IDM.UnsupportedCluster | ||
- name: "CommandId" | ||
value: InvokeRequestMessage.Command | ||
- name: "Payload" | ||
value: InvokeRequestMessage.Payload | ||
response: | ||
error: UNSUPPORTED_CLUSTER | ||
|
||
- label: | ||
"TH sends the Invoke Request Message to the DUT with the path that | ||
indicates a specific command that is unsupported." | ||
cluster: "AnyCommands" | ||
command: "CommandById" | ||
endpoint: InvokeRequestMessage.EndPoint | ||
arguments: | ||
values: | ||
- name: "ClusterId" | ||
value: InvokeRequestMessage.Cluster | ||
- name: "CommandId" | ||
value: PIXIT.IDM.UnsupportedCommand | ||
- name: "Payload" | ||
value: InvokeRequestMessage.Payload | ||
response: | ||
error: UNSUPPORTED_COMMAND | ||
|
||
- label: | ||
"Setup the TH such that it should not have the privilege for the | ||
cluster in the path." | ||
cluster: "AccessControl" | ||
command: "writeAttribute" | ||
attribute: "ACL" | ||
endpoint: PIXIT.Cluster.AccessControl.EndPoint | ||
arguments: | ||
value: | ||
[ | ||
{ | ||
"fabricIndex": alphaIndex, | ||
"Privilege": 5, | ||
"AuthMode": 2, | ||
"Subjects": [commissionerNodeIdAlpha], | ||
"Targets": | ||
[ | ||
{ | ||
"Cluster": 31, | ||
"Endpoint": 0, | ||
"DeviceType": null, | ||
}, | ||
], | ||
}, | ||
] | ||
|
||
- label: | ||
"TH sends the Invoke Request Message to the DUT with a valid | ||
CommandDataIB" | ||
cluster: "AnyCommands" | ||
command: "CommandById" | ||
endpoint: InvokeRequestMessage.EndPoint | ||
arguments: | ||
values: | ||
- name: "ClusterId" | ||
value: InvokeRequestMessage.Cluster | ||
- name: "CommandId" | ||
value: InvokeRequestMessage.Command | ||
- name: "Payload" | ||
value: InvokeRequestMessage.Payload | ||
response: | ||
error: UNSUPPORTED_ACCESS | ||
|
||
- label: | ||
"TH sends the Invoke Request Message to the DUT with a valid and | ||
fabric-scoped CommandDataIB" | ||
cluster: "General Commissioning" | ||
command: "CommissioningComplete" | ||
endpoint: PIXIT.Cluster.GeneralCommissioning.EndPoint | ||
response: | ||
error: UNSUPPORTED_ACCESS | ||
|
||
- label: | ||
"Setup the TH such that it should have the privilege for the cluster | ||
in the path." | ||
cluster: "AccessControl" | ||
command: "writeAttribute" | ||
endpoint: PIXIT.Cluster.AccessControl.EndPoint | ||
attribute: "ACL" | ||
arguments: | ||
value: | ||
[ | ||
{ | ||
"fabricIndex": alphaIndex, | ||
"Privilege": 5, | ||
"AuthMode": 2, | ||
"Subjects": [commissionerNodeIdAlpha], | ||
"Targets": null, | ||
}, | ||
] | ||
|
||
- label: | ||
"(OPTIONAL) TH sends the Invoke Request Message to the DUT with the | ||
command which requires a data response to be sent back." | ||
cluster: "General Commissioning" | ||
command: "ArmFailSafe" | ||
endpoint: PIXIT.Cluster.GeneralCommissioning.EndPoint | ||
arguments: | ||
values: | ||
- name: "ExpiryLengthSeconds" | ||
value: 1000 | ||
- name: "Breadcrumb" | ||
value: 1 | ||
response: | ||
values: | ||
- name: "ErrorCode" | ||
value: 0 | ||
|
||
- label: | ||
"TH sends the Invoke Request Message to the DUT with a valid | ||
CommandDataIB and SuppressResponse set to True" | ||
disabled: true | ||
verification: | | ||
Out of Scope for V1.0 | ||
https://github.com/project-chip/connectedhomeip/issues/8043 | ||
cluster: InvokeRequestMessage.Cluster | ||
command: InvokeRequestMessage.Command | ||
endpoint: InvokeRequestMessage.EndPoint | ||
arguments: | ||
values: | ||
- name: "Payload" | ||
value: PIXIT.InvokeRequestMessage.Payload | ||
|
||
- label: | ||
"Setup the TH such that it should not have the privilege for the | ||
cluster in the path." | ||
cluster: "AccessControl" | ||
command: "writeAttribute" | ||
attribute: "ACL" | ||
endpoint: PIXIT.Cluster.AccessControl.EndPoint | ||
arguments: | ||
value: | ||
[ | ||
{ | ||
"fabricIndex": alphaIndex, | ||
"Privilege": 5, | ||
"AuthMode": 2, | ||
"Subjects": [commissionerNodeIdAlpha], | ||
"Targets": | ||
[ | ||
{ | ||
"Cluster": 31, | ||
"Endpoint": 0, | ||
"DeviceType": null, | ||
}, | ||
], | ||
}, | ||
] | ||
|
||
- label: | ||
"TH sends a Invoke Request Message to the DUT with the TimedRequest | ||
set as TRUE.(There should be no previous Timed Invoke action.)" | ||
cluster: "AnyCommands" | ||
command: "CommandById" | ||
endpoint: InvokeRequestMessage.EndPoint | ||
timedInteractionTimeoutMs: 1000 | ||
arguments: | ||
values: | ||
- name: "ClusterId" | ||
value: InvokeRequestMessage.Cluster | ||
- name: "CommandId" | ||
value: InvokeRequestMessage.Command | ||
- name: "Payload" | ||
value: InvokeRequestMessage.Payload | ||
response: | ||
error: UNSUPPORTED_ACCESS | ||
|
||
- label: | ||
"Setup the TH such that it should have the privilege for the cluster | ||
in the path." | ||
cluster: "AccessControl" | ||
command: "writeAttribute" | ||
endpoint: PIXIT.Cluster.AccessControl.EndPoint | ||
attribute: "ACL" | ||
arguments: | ||
value: | ||
[ | ||
{ | ||
"fabricIndex": alphaIndex, | ||
"Privilege": 5, | ||
"AuthMode": 2, | ||
"Subjects": [commissionerNodeIdAlpha], | ||
"Targets": null, | ||
}, | ||
] | ||
|
||
- label: | ||
"TH sends Invoke Request Message to the DUT with the command in the | ||
path that requires a Timed Invoke transaction to invoke and this | ||
action is not part of a Timed Invoke transaction" | ||
cluster: "AdministratorCommissioning" | ||
command: "OpenBasicCommissioningWindow" | ||
endpoint: PIXIT.Cluster.AdministratorCommissioning.EndPoint | ||
arguments: | ||
values: | ||
- name: "CommissioningTimeout" | ||
value: 180 | ||
response: | ||
error: NEEDS_TIMED_INTERACTION |