-
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.
Add Test Script for Air Quality Cluster (#26879)
* Add Test_TC_AIRQUAL_1_1.yaml * Add Test_TC_AIRQUAL_2_1.yaml * Add Test_TC_AIRQUAL_2_2.yaml * Save First Response * Add AirQualiity Test Scripts To PICS and ciTests.json * Add Generated Code * Add CI PICS Values for Air Quality * Update CI PICS Values * Make Restyler Happy * Don’t Run the Last 2 Test Steps of TC-AIRQUAL-2.2 Those test steps are semi automated and can’t run in CI * Remove Test_TC_AIRQUAL_2_2 * Fix Bitmasks * Update Code Gen --------- Co-authored-by: Graf Tobias <[email protected]>
- Loading branch information
Showing
7 changed files
with
1,046 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
125 changes: 125 additions & 0 deletions
125
src/app/tests/suites/certification/Test_TC_AIRQUAL_1_1.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,125 @@ | ||
# 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: 164.1.1. [TC-AIRQUAL-1.1] Global Attributes with DUT as Server | ||
|
||
PICS: | ||
- AIRQUAL.S | ||
|
||
config: | ||
nodeId: 0x12344321 | ||
cluster: "Air Quality" | ||
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: | ||
"!AIRQUAL.S.F00 && !AIRQUAL.S.F01 && !AIRQUAL.S.F02 && !AIRQUAL.S.F03" | ||
response: | ||
value: 0 | ||
constraints: | ||
type: bitmap32 | ||
|
||
- label: | ||
"Given AIRQUAL.S.F00(Fair) ensure featuremap has the correct bit set" | ||
command: "readAttribute" | ||
attribute: "FeatureMap" | ||
PICS: AIRQUAL.S.F00 | ||
response: | ||
constraints: | ||
type: bitmap32 | ||
hasMasksSet: [0x1] | ||
|
||
- label: | ||
"Given AIRQUAL.S.F01(Moderate) ensure featuremap has the correct bit | ||
set" | ||
command: "readAttribute" | ||
attribute: "FeatureMap" | ||
PICS: AIRQUAL.S.F01 | ||
response: | ||
constraints: | ||
type: bitmap32 | ||
hasMasksSet: [0x2] | ||
|
||
- label: | ||
"Given AIRQUAL.S.F02(VeryPoor) ensure featuremap has the correct bit | ||
set" | ||
command: "readAttribute" | ||
attribute: "FeatureMap" | ||
PICS: AIRQUAL.S.F02 | ||
response: | ||
constraints: | ||
type: bitmap32 | ||
hasMasksSet: [0x4] | ||
|
||
- label: | ||
"Given AIRQUAL.S.F03(ExtremelyPoor) ensure featuremap has the correct | ||
bit set" | ||
command: "readAttribute" | ||
attribute: "FeatureMap" | ||
PICS: AIRQUAL.S.F03 | ||
response: | ||
constraints: | ||
type: bitmap32 | ||
hasMasksSet: [0x8] | ||
|
||
- label: "Read the global attribute: AttributeList" | ||
command: "readAttribute" | ||
attribute: "AttributeList" | ||
response: | ||
constraints: | ||
type: list | ||
contains: [0, 65528, 65529, 65530, 65531, 65532, 65533] | ||
|
||
- label: "Read the global attribute: AcceptedCommandList" | ||
command: "readAttribute" | ||
attribute: "AcceptedCommandList" | ||
response: | ||
constraints: | ||
type: list | ||
contains: [] | ||
|
||
- 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 |
42 changes: 42 additions & 0 deletions
42
src/app/tests/suites/certification/Test_TC_AIRQUAL_2_1.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,42 @@ | ||
# 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: 3.2.1. [TC-AIRQUAL-2.1] Attributes with server as DUT | ||
|
||
PICS: | ||
- AIRQUAL.S | ||
|
||
config: | ||
nodeId: 0x12344321 | ||
cluster: "Air Quality" | ||
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 AirQuality attribute." | ||
PICS: AIRQUAL.S.A0000 | ||
command: "readAttribute" | ||
attribute: "AirQuality" | ||
response: | ||
constraints: | ||
type: enum8 | ||
minValue: 0 | ||
maxValue: 6 |
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
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
Oops, something went wrong.