Skip to content

Commit

Permalink
Add test scripts for testing Presets attributes and commands for Ther…
Browse files Browse the repository at this point in the history
…mostat cluster
  • Loading branch information
nivi-apple committed Jul 30, 2024
1 parent 08dfc13 commit 57e36cb
Show file tree
Hide file tree
Showing 4 changed files with 2,386 additions and 0 deletions.
50 changes: 50 additions & 0 deletions src/app/tests/suites/certification/PICS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6419,6 +6419,21 @@ PICS:
- label: "Does the device implement the ACCapacityFormat attribute?"
id: TSTAT.S.A0047

- label: "Does the device implement the PresetTypes attribute?"
id: TSTAT.S.A0048

- label: "Does the device implement the NumberOfPresets attribute?"
id: TSTAT.S.A004a

- label: "Does the device implement the ActivePresetHandle attribute?"
id: TSTAT.S.A004e

- label: "Does the device implement the Presets attribute?"
id: TSTAT.S.A0050

- label: "Does the device implement the PresetsSchedulesEditable attribute?"
id: TSTAT.S.A0052

#
# server / commandsReceived
#
Expand All @@ -6442,6 +6457,22 @@ PICS:
"Does the device implement receiving the GetRelayStatusLog command?"
id: TSTAT.S.C04.Rsp

- label:
"Does the device implement receiving the SetActivePresetRequest command?"
id: TSTAT.S.C06.Rsp

- label:
"Does the device implement receiving the StartPresetsSchedulesEditRequest command?"
id: TSTAT.S.C07.Rsp

- label:
"Does the device implement receiving the CancelPresetsSchedulesEditRequest command?"
id: TSTAT.S.C08.Rsp

- label:
"Does the device implement receiving the CommitPresetsSchedulesRequest command?"
id: TSTAT.S.C09.Rsp

#
# server / commandsGenerated
#
Expand Down Expand Up @@ -6479,6 +6510,9 @@ PICS:
- label: "Supports a local temperature not exposed"
id: TSTAT.S.F06

- label: "Supports setpoint presets"
id: TSTAT.S.F08

#
# server / manually
#
Expand Down Expand Up @@ -6520,6 +6554,22 @@ PICS:
- label: "Does the device implement sending the GetRelayStatusLog command?"
id: TSTAT.C.C04.Tx

- label:
"Does the device implement sending the SetActivePresetRequest command?"
id: TSTAT.C.C05.Tx

- label:
"Does the device implement sending the StartPresetsSchedulesEditRequest command?"
id: TSTAT.C.C06.Tx

- label:
"Does the device implement sending the CancelPresetsSchedulesEditRequest command?"
id: TSTAT.C.C07.Tx

- label:
"Does the device implement sending the CommitPresetsSchedulesRequest command?"
id: TSTAT.C.C08.Tx

#
# client / manually
#
Expand Down
32 changes: 32 additions & 0 deletions src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,17 @@ tests:
type: bitmap32
hasMasksSet: [0x40]

- label:
"Step 3i: Given TSTAT.S.F08(PRES ensure featuremap has the correct bit
set"
PICS: TSTAT.S.F08
command: "readAttribute"
attribute: "FeatureMap"
response:
constraints:
type: bitmap32
hasMasksSet: [0x100]

- label: "Step 4a: TH reads from the DUT the AttributeList attribute."
PICS: PICS_EVENT_LIST_ENABLED
command: "readAttribute"
Expand Down Expand Up @@ -555,6 +566,17 @@ tests:
type: list
contains: [30]

- label:
"Step 4j: TH reads the Feature dependent(TSTAT.S.F08(PRES) attribute
in AttributeList"
PICS: TSTAT.S.F08
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [72, 74, 78, 80, 82]

- label: "Step 5: TH reads EventList attribute from the DUT."
PICS: PICS_EVENT_LIST_ENABLED
command: "readAttribute"
Expand Down Expand Up @@ -593,6 +615,16 @@ tests:
constraints:
type: list
contains: [4]
- label:
"Step 6d: TH reads Feature dependent(TSTAT.S.F08(PRES)) commands in
AcceptedCommandList"
PICS: TSTAT.S.F08
command: "readAttribute"
attribute: "AcceptedCommandList"
response:
constraints:
type: list
contains: [6, 7, 8, 9]

- label:
"Step 7a: TH reads from the DUT the GeneratedCommandList attribute."
Expand Down
117 changes: 117 additions & 0 deletions src/app/tests/suites/certification/Test_TC_TSTAT_4_1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# 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: 42.4.1. [TC-TSTAT-4.1] Preset attributes with server as DUT

PICS:
- TSTAT.S

config:
nodeId: 0x12344321
cluster: "Thermostat"
endpoint: 1

tests:
- label: "Step 1: Commission DUT to TH"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId

- label:
"Saving value for comparision in step 2 read
PresetTypes attribute"
PICS: TSTAT.S.A0048
command: "readAttribute"
attribute: "PresetTypes"
response:
saveAs: PresetTypesValue

- label:
"Saving value for comparision in step 3 read
NumberOfPresets attribute"
PICS: TSTAT.S.A004a
command: "readAttribute"
attribute: "NumberOfPresets"
response:
saveAs: NumberOfPresetsValue

- label:
"Saving value for comparision in step 4 read
ActivePresetHandleValue attribute"
PICS: TSTAT.S.A004e
command: "readAttribute"
attribute: "ActivePresetHandle"
response:
saveAs: ActivePresetHandleValue

- label:
"Saving value for comparision in step 5 read
Presets attribute"
PICS: TSTAT.S.A0050
command: "readAttribute"
attribute: "Presets"
response:
saveAs: PresetsValue

- label:
"Saving value for comparision in step 6 read
PresetsSchedulesEditable attribute"
PICS: TSTAT.S.A0052
command: "readAttribute"
attribute: "PresetsSchedulesEditable"
response:
saveAs: PresetsSchedulesEditableValue

- label: "Step 2: TH reads the PresetTypes attribute from the DUT"
PICS: TSTAT.S.F08 & TSTAT.S.A0048
command: "readAttribute"
attribute: "PresetTypes"
response:
constraints:
type: list

- label: "Step 3: TH reads the NumberOfPresets attribute from the DUT"
PICS: TSTAT.S.F08 & TSTAT.S.A004a
command: "readAttribute"
attribute: "NumberOfPresets"
response:
constraints:
type: int8u

- label: "Step 4: TH reads the ActivePresetHandle attribute from the DUT"
PICS: TSTAT.S.F08 & TSTAT.S.A004e
command: "readAttribute"
attribute: "ActivePresetHandle"
response:
constraints:
type: octstr

- label: "Step 5: TH reads the Presets attribute from the DUT"
PICS: TSTAT.S.F08 & TSTAT.S.A0050
command: "readAttribute"
attribute: "Presets"
response:
constraints:
type: list

- label: "Step 6: TH reads the PresetsSchedulesEditable attribute from the DUT"
PICS: TSTAT.S.F08 & TSTAT.S.A0052
command: "readAttribute"
attribute: "PresetsSchedulesEditable"
response:
constraints:
type: boolean
Loading

0 comments on commit 57e36cb

Please sign in to comment.