Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Test Script for Replaceable Monitoring Clusters #26882

Merged
merged 19 commits into from
Jun 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
492 changes: 492 additions & 0 deletions src/app/tests/suites/certification/PICS.yaml

Large diffs are not rendered by default.

133 changes: 133 additions & 0 deletions src/app/tests/suites/certification/Test_TC_ACFREMON_1_1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Copyright (c) 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: 165.1.1. [TC-ACFREMON-1.1] Global Attributes with DUT as Server

PICS:
- ACFREMON.S

config:
nodeId: 0x12344321
cluster: "Activated Carbon Filter Monitoring"
endpoint: 1

tests:
- label: "Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId

- label: "Read the global attribute: ClusterRevision"
command: "readAttribute"
attribute: "ClusterRevision"
response:
value: 1
constraints:
type: int16u

- label: "Read the global attribute: FeatureMap"
command: "readAttribute"
attribute: "FeatureMap"
PICS: "!ACFREMON.S.F00 && !ACFREMON.S.F01"
response:
value: 0
constraints:
type: bitmap32

- label:
"Given ACFREMON.S.F00(Condition) ensure featuremap has the correct bit
set"
command: "readAttribute"
attribute: "FeatureMap"
PICS: ACFREMON.S.F00
response:
constraints:
type: bitmap32
hasMasksSet: [0x1]

- label:
"Given ACFREMON.S.F01(Warning) ensure featuremap has the correct bit
set"
command: "readAttribute"
attribute: "FeatureMap"
PICS: ACFREMON.S.F01
response:
constraints:
type: bitmap32
hasMasksSet: [0x2]

- label: "Read the global attribute: AttributeList"
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [2, 65528, 65529, 65530, 65531, 65532, 65533]

- label:
"Read the feature dependent(ACFREMON.S.F00) attribute in AttributeList"
PICS: ACFREMON.S.F00
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [0, 1]

- label:
"Read the optional attribute InPlaceIndicator (ACFREMON.S.A0002) in
AttributeList"
PICS: ACFREMON.S.A0002
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [3]

- label: "Read the global attribute: AcceptedCommandList"
tobiasgraf marked this conversation as resolved.
Show resolved Hide resolved
command: "readAttribute"
attribute: "AcceptedCommandList"
response:
constraints:
type: list
contains: []
tobiasgraf marked this conversation as resolved.
Show resolved Hide resolved

- label: "Read the optional command (ResetCondition) in AcceptedCommandList"
PICS: ACFREMON.S.C00.Rsp
command: "readAttribute"
attribute: "AcceptedCommandList"
response:
constraints:
type: list
contains: [0]

- label: "Read the global attribute: GeneratedCommandList"
command: "readAttribute"
attribute: "GeneratedCommandList"
response:
value: []
constraints:
type: list

- label: "TH reads EventList attribute from DUT"
command: "readAttribute"
attribute: "EventList"
response:
value: []
constraints:
type: list
70 changes: 70 additions & 0 deletions src/app/tests/suites/certification/Test_TC_ACFREMON_2_1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Copyright (c) 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: 165.2.1. [TC-ACFREMON-2.1] Attributes with server as DUT

PICS:
- ACFREMON.S

config:
nodeId: 0x12344321
cluster: "Activated Carbon Filter Monitoring"
endpoint: 1

tests:
- label: "Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId

- label: "TH reads from the DUT the Condition attribute."
PICS: ACFREMON.S.A0000
command: "readAttribute"
attribute: "Condition"
response:
constraints:
type: percent
minValue: 0
maxValue: 100

- label: "TH reads from the DUT the DegradationDirection attribute.."
PICS: ACFREMON.S.A0001
command: "readAttribute"
attribute: "DegradationDirection"
response:
constraints:
type: enum8
minValue: 0
maxValue: 1

- label: "TH reads from the DUT the ChangeIndication attribute."
PICS: ACFREMON.S.A0002
command: "readAttribute"
attribute: "ChangeIndication"
response:
constraints:
type: enum8
minValue: 0
maxValue: 2

- label: "TH reads from the DUT the InPlaceIndicator attribute"
PICS: ACFREMON.S.A0003
command: "readAttribute"
attribute: "InPlaceIndicator"
response:
constraints:
type: boolean
133 changes: 133 additions & 0 deletions src/app/tests/suites/certification/Test_TC_CFREMON_1_1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Copyright (c) 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: 165.1.1. [TC-CFREMON-1.1] Global Attributes with DUT as Server

PICS:
- CFREMON.S

config:
nodeId: 0x12344321
cluster: "Ceramic Filter Monitoring"
endpoint: 1

tests:
- label: "Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId

- label: "Read the global attribute: ClusterRevision"
command: "readAttribute"
attribute: "ClusterRevision"
response:
value: 1
constraints:
type: int16u

- label: "Read the global attribute: FeatureMap"
command: "readAttribute"
attribute: "FeatureMap"
PICS: "!CFREMON.S.F00 && !CFREMON.S.F01"
response:
value: 0
constraints:
type: bitmap32

- label:
"Given CFREMON.S.F00(Condition) ensure featuremap has the correct bit
set"
command: "readAttribute"
attribute: "FeatureMap"
PICS: CFREMON.S.F00
response:
constraints:
type: bitmap32
hasMasksSet: [0x1]

- label:
"Given CFREMON.S.F01(Warning) ensure featuremap has the correct bit
set"
command: "readAttribute"
attribute: "FeatureMap"
PICS: CFREMON.S.F01
response:
constraints:
type: bitmap32
hasMasksSet: [0x2]

- label: "Read the global attribute: AttributeList"
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [2, 65528, 65529, 65530, 65531, 65532, 65533]

- label:
"Read the feature dependent(CFREMON.S.F00) attribute in AttributeList"
PICS: CFREMON.S.F00
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [0, 1]

- label:
"Read the optional attribute InPlaceIndicator (CFREMON.S.A0002) in
AttributeList"
PICS: CFREMON.S.A0002
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [3]

- label: "Read the global attribute: AcceptedCommandList"
command: "readAttribute"
attribute: "AcceptedCommandList"
response:
constraints:
type: list
contains: []

- label: "Read the optional command (ResetCondition) in AcceptedCommandList"
PICS: CFREMON.S.C00.Rsp
command: "readAttribute"
attribute: "AcceptedCommandList"
response:
constraints:
type: list
contains: [0]

- label: "Read the global attribute: GeneratedCommandList"
command: "readAttribute"
attribute: "GeneratedCommandList"
response:
value: []
constraints:
type: list

- label: "TH reads EventList attribute from DUT"
command: "readAttribute"
attribute: "EventList"
response:
value: []
constraints:
type: list
Loading