Skip to content

Commit

Permalink
Automated tests:
Browse files Browse the repository at this point in the history
TC_DEMM_1_1
TC_DEMM_2_1
TC_EEVSE_1_1
TC_EEVSE_2_1
TC_REFALM_2_2
TC_EEVSEM_1_1
TC_EEVSEM_2_1
TC_EEVSEM_3_1
TC_EEVSEM_3_2
TC_EEVSEM_3_3
Manual tests:
TC_DEMM_1_2
TC_EEVSEM_1_2
  • Loading branch information
manjunath-grl committed Feb 1, 2024
1 parent 6d329d6 commit ea9c1c9
Show file tree
Hide file tree
Showing 20 changed files with 5,434 additions and 512 deletions.
6 changes: 6 additions & 0 deletions examples/darwin-framework-tool/templates/tests/ciTests.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"Test_TC_APPLAUNCHER_3_7",
"Test_TC_APPLAUNCHER_3_8",
"Test_TC_APPLAUNCHER_3_9",
"TC_MEDIAPLAYBACK_6_8",
"TC_MEDIAPLAYBACK_6_9",
"Test_TC_BINFO_2_1",
"Test_TC_SWTCH_2_1",
"Test_TC_G_2_1",
Expand Down Expand Up @@ -67,6 +69,10 @@
"Test_TC_OTCCM_3_1",
"Test_TC_OTCCM_3_2",
"Test_TC_OTCCM_3_3",
"Test_TC_EEVSEM_2_1",
"Test_TC_EEVSEM_3_1",
"Test_TC_EEVSEM_3_2",
"Test_TC_EEVSEM_3_3",
"Disabled because darwin-framework-tool does not support constraints arithmetic operations",
"Test_TC_FLW_2_1",
"Test_TC_RH_2_1",
Expand Down
4 changes: 4 additions & 0 deletions scripts/tests/chiptest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ def _GetChipReplUnsupportedTests() -> Set[str]:
"Test_TC_RVCCLEANM_3_3.yaml", # chip-repl does not support EqualityCommands pseudo-cluster
"Test_TC_BINFO_2_1.yaml", # chip-repl does not support EqualityCommands pseudo-cluster
"TestDiagnosticLogs.yaml", # chip-repl does not implement a BDXTransferServerDelegate
"Test_TC_EEVSEM_2_1.yaml", # chip-repl does not support EqualityCommands pseudo-cluster
"Test_TC_EEVSEM_3_1.yaml", # chip-repl does not support EqualityCommands pseudo-cluster
"Test_TC_EEVSEM_3_2.yaml", # chip-repl does not support EqualityCommands pseudo-cluster
"Test_TC_EEVSEM_3_3.yaml", # chip-repl does not support EqualityCommands pseudo-cluster
}


Expand Down
78 changes: 78 additions & 0 deletions src/app/tests/suites/certification/PICS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9962,3 +9962,81 @@ PICS:
# Commands generated
- label: "Does the device implement sending the GetTargetsResponse command?"
id: EEVSE.S.C00.Tx

# Energy EVSE Mode Cluster
# server / attributes
- label: "Does the device implement the Energy EVSE cluster as a server?"
id: EEVSEM.S

- label: "Does the device implement the SupportedModes attribute?"
id: EEVSEM.S.A0000

- label: "Does the device implement the CurrentMode attribute?"
id: EEVSEM.S.A0001

- label: "Does the device implement the StartUpMode attribute?"
id: EEVSEM.S.A0002

- label: "Does the device implement the OnMode attribute?"
id: EEVSEM.S.A0003

# Commands received
- label: "Does the device implement sending the ChangeToMode command?"
id: EEVSEM.S.C00.Rsp

# Commands generated
- label:
"Does the device implement sending the ChangeToModeResponse command?"
id: EEVSEM.S.C01.Tx

# Manual controllable
- label: "Does the DUT support testing the failed ChangeToMode command?"
id: EEVSEM.S.M.CAN_TEST_MODE_FAILURE

- label: "Can the mode change be manually controlled?"
id: EEVSEM.S.M.CAN_MANUALLY_CONTROLLED

#Feature
- label: "Does the DUT(server) support the Hue/Saturation feature?"
id: EEVSEM.S.F00

#
# Device Energy Management Mode Cluster
# server / attributes

- label: "Does the device implement the DEMM cluster as a server?"
id: DEMM.S

- label: "Does the device implement the SupportedModes attribute?"
id: DEMM.S.A0000

- label: "Does the device implement the CurrentMode attribute?"
id: DEMM.S.A0001

- label: "Does the device implement the StartUpMode attribute?"
id: DEMM.S.A0002

- label: "Does the device implement the OnMode attribute?"
id: DEMM.S.A0003

# Commands received
- label: "Does the device implement sending the ChangeToMode command?"
id: DEMM.S.C00.Rsp

# Commands generated
- label:
"Does the device implement sending the ChangeToModeResponse command?"
id: DEMM.S.C01.Tx

- label: "Does the DUT support testing the failed ChangeToMode command?"
id: DEMM.S.M.CAN_TEST_MODE_FAILURE

- label: "Can the mode change be manually controlled?"
id: DEMM.S.M.CAN_MANUALLY_CONTROLLED

# Manual controllable
- label: "Does the DUT support testing the failed ChangeToMode command?"
id: EEVSEM.S.M.CAN_TEST_MODE_FAILURE

- label: "Can the mode change be manually controlled?"
id: EEVSEM.S.M.CAN_MANUALLY_CONTROLLED
116 changes: 116 additions & 0 deletions src/app/tests/suites/certification/Test_TC_DEMM_1_1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# 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: 241.1.1. [TC-DEMM-1.1] Global attributes with DUT as Server

PICS:
- DEMM.S

config:
nodeId: 0x12344321
cluster: "Device Energy Management Mode"
endpoint: 1

tests:
- label:
"Step 1: Commission DUT to TH (can be skipped if done in a preceding
test)."
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId

- label: "Step 2: TH reads from the DUT the ClusterRevision attribute"
command: "readAttribute"
attribute: "ClusterRevision"
response:
value: 1
constraints:
type: int16u

#https://github.com/project-chip/connectedhomeip/issues/31599
- label: "Step 3: TH reads from the DUT the FeatureMap attribute"
verification: |
./chip-tool deviceenergymanagementmode read feature-map 1 1
On the TH(Chip-tool) Log, Verify featureMap value is 0 and below is the sample log provided for the raspi platform:
[1705923720.577354][23553:23555] CHIP:DMG: }
[1705923720.577393][23553:23555] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_009F Attribute 0x0000_FFFC DataVersion: 2217281174
[1705923720.577412][23553:23555] CHIP:TOO: FeatureMap: 1
cluster: "LogCommands"
command: "UserPrompt"
PICS: PICS_SKIP_SAMPLE_APP
arguments:
values:
- name: "message"
value: "Enter 'y' after success"
- name: "expectedValue"
value: "y"

- label: "Step 4: TH reads from the DUT the AttributeList attribute."
PICS: PICS_EVENT_LIST_ENABLED
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [0, 1, 65528, 65529, 65530, 65531, 65532, 65533]

- label: "Step 4a: TH reads from the DUT the AttributeList attribute."
PICS: "!PICS_EVENT_LIST_ENABLED"
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [0, 1, 65528, 65529, 65531, 65532, 65533]

- label:
"Step 4b: TH reads optional attribute (StartUpMode) in AttributeList
from DUT"
PICS: DEMM.S.A0002
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [2]

- label: "Step 5: TH reads from the DUT the EventList attribute."
PICS: PICS_EVENT_LIST_ENABLED
command: "readAttribute"
attribute: "EventList"
response:
value: []
constraints:
type: list

- label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute."
command: "readAttribute"
attribute: "AcceptedCommandList"
response:
value: [0]
constraints:
type: list

- label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute."
command: "readAttribute"
attribute: "GeneratedCommandList"
response:
value: [1]
constraints:
type: list
112 changes: 112 additions & 0 deletions src/app/tests/suites/certification/Test_TC_DEMM_1_2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# 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.
# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default

name: 241.1.2. [TC-DEMM-1.2] Cluster attributes with DUT as Server

PICS:
- DEMM.S

config:
nodeId: 0x12344321
cluster: "Basic Information"
endpoint: 1

tests:
- label: "Step 1: TH reads from the DUT the SupportedModes attribute"
PICS: DEMM.S.A0000
verification: |
./chip-tool deviceenergymanagementmode read supported-modes 1 1
- Verify that the DUT response contains a list of ModeOptionsStruct entries
- Verify that the list has at least 2 and at most 255 entries
- Verify that each ModeOptionsStruct entry has a unique Mode field value
- Verify that each ModeOptionsStruct entry has a unique Label field value
- Verify that each ModeOptionsStruct entry’s ModeTags field has:
at least one entry the values of the Value fields that are not larger than 16 bits
- for each Value field: Is the mode tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster-derived tag value (No Optimization, Device Optimization, Local Optimization, Grid Optimization) or in the MfgTags (0x8000 to 0xBFFF) range
- for at least one Value field: Is the mode tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a derived cluster value (RapidCool, RapidFreeze)
- if the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64
- Verify that at least one ModeOptionsStruct entry includes either the RapidCool semantic tag or the RapidFreeze semantic tag in the SemanticTags field
- Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform:
[1705923890.093456][23589:23591] CHIP:DMG: }
[1705923890.094137][23589:23591] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_009F Attribute 0x0000_0000 DataVersion: 2217281174
[1705923890.094312][23589:23591] CHIP:TOO: SupportedModes: 5 entries
[1705923890.094403][23589:23591] CHIP:TOO: [1]: {
[1705923890.094423][23589:23591] CHIP:TOO: Label: No energy management (forecast only)
[1705923890.094458][23589:23591] CHIP:TOO: Mode: 0
[1705923890.094483][23589:23591] CHIP:TOO: ModeTags: 1 entries
[1705923890.094513][23589:23591] CHIP:TOO: [1]: {
[1705923890.094531][23589:23591] CHIP:TOO: Value: 16384
[1705923890.094542][23589:23591] CHIP:TOO: }
[1705923890.094552][23589:23591] CHIP:TOO: }
[1705923890.094579][23589:23591] CHIP:TOO: [2]: {
[1705923890.094590][23589:23591] CHIP:TOO: Label: Device optimizes (no local or grid control)
[1705923890.094601][23589:23591] CHIP:TOO: Mode: 1
[1705923890.094615][23589:23591] CHIP:TOO: ModeTags: 1 entries
[1705923890.094632][23589:23591] CHIP:TOO: [1]: {
[1705923890.094642][23589:23591] CHIP:TOO: Value: 16385
[1705923890.094653][23589:23591] CHIP:TOO: }
[1705923890.094664][23589:23591] CHIP:TOO: }
[1705923890.094687][23589:23591] CHIP:TOO: [3]: {
[1705923890.094697][23589:23591] CHIP:TOO: Label: Optimized within building
[1705923890.094706][23589:23591] CHIP:TOO: Mode: 2
[1705923890.094722][23589:23591] CHIP:TOO: ModeTags: 2 entries
[1705923890.094738][23589:23591] CHIP:TOO: [1]: {
[1705923890.094748][23589:23591] CHIP:TOO: Value: 16386
[1705923890.094759][23589:23591] CHIP:TOO: }
[1705923890.094773][23589:23591] CHIP:TOO: [2]: {
[1705923890.094784][23589:23591] CHIP:TOO: Value: 16385
[1705923890.094794][23589:23591] CHIP:TOO: }
[1705923890.094804][23589:23591] CHIP:TOO: }
[1705923890.094827][23589:23591] CHIP:TOO: [4]: {
[1705923890.094836][23589:23591] CHIP:TOO: Label: Optimized for grid
[1705923890.094846][23589:23591] CHIP:TOO: Mode: 3
[1705923890.094861][23589:23591] CHIP:TOO: ModeTags: 2 entries
[1705923890.094876][23589:23591] CHIP:TOO: [1]: {
[1705923890.094886][23589:23591] CHIP:TOO: Value: 16385
[1705923890.094893][23589:23591] CHIP:TOO: }
[1705923890.094908][23589:23591] CHIP:TOO: [2]: {
[1705923890.094917][23589:23591] CHIP:TOO: Value: 16387
[1705923890.094927][23589:23591] CHIP:TOO: }
[1705923890.094935][23589:23591] CHIP:TOO: }
[1705923890.094960][23589:23591] CHIP:TOO: [5]: {
[1705923890.094971][23589:23591] CHIP:TOO: Label: Optimized for grid and building
[1705923890.094980][23589:23591] CHIP:TOO: Mode: 4
[1705923890.094998][23589:23591] CHIP:TOO: ModeTags: 3 entries
[1705923890.095013][23589:23591] CHIP:TOO: [1]: {
[1705923890.095022][23589:23591] CHIP:TOO: Value: 16386
[1705923890.095032][23589:23591] CHIP:TOO: }
[1705923890.095047][23589:23591] CHIP:TOO: [2]: {
[1705923890.095057][23589:23591] CHIP:TOO: Value: 16385
[1705923890.095066][23589:23591] CHIP:TOO: }
[1705923890.095080][23589:23591] CHIP:TOO: [3]: {
[1705923890.095090][23589:23591] CHIP:TOO: Value: 16387
[1705923890.095099][23589:23591] CHIP:TOO: }
[1705923890.095109][23589:23591] CHIP:TOO: }
disabled: true

- label: "Step 2: TH reads from the DUT the CurrentMode attribute"
PICS: DEMM.S.A0001
verification: |
./chip-tool deviceenergymanagementmode read current-mode 1 1
Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value from supported_modes_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0
[1705923927.418159][23602:23604] CHIP:DMG: }
[1705923927.418327][23602:23604] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_009F Attribute 0x0000_0001 DataVersion: 2217281174
[1705923927.418389][23602:23604] CHIP:TOO: CurrentMode: 0
disabled: true
Loading

0 comments on commit ea9c1c9

Please sign in to comment.