Skip to content

Commit

Permalink
Add Test Script for Replaceable Monitoring Clusters (#26882)
Browse files Browse the repository at this point in the history
* Add Test scripts for HepaFilterMonitoring Cluster

#26842

* Update Test scripts for Hepa Filter Monitoring #26842

* Add Test Scripts for the remaining Replaceable Monitoring Aliased clusters

#26842

* Update ciTests.json and PICS.yaml

* Update generated code

* Fix minor formatting

* Fix minor formatting

* Add Replaceable Monitoring Ci-pics-values

* Update Generated Code

* Update Replaceable Monitoring Ci-pics-values

* Apply restyler patch

* Add 2 more Tests

- test that checks that attribute 3 is present if the right PICS is set.
- test that checks for command 0 if the right PICS is set.

* Update Generated Code

* Apply restyled patch

* Add missing PICS to ci-pics-values

* Update ciTests.json

Fix Naming confusion Replaceable vs Resource Monitoring
  • Loading branch information
tobiasgraf authored and pull[bot] committed Jul 20, 2023
1 parent e3a4eee commit 4684406
Show file tree
Hide file tree
Showing 29 changed files with 15,764 additions and 1 deletion.
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"
command: "readAttribute"
attribute: "AcceptedCommandList"
response:
constraints:
type: list
contains: []

- 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

0 comments on commit 4684406

Please sign in to comment.