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 tests for Smoke CO Alarm #27123

Merged
merged 27 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
776f520
Fix decoding of TLV payload data
hare-siterwell Jul 10, 2023
739d0a3
Restyled by autopep8
restyled-commits Jul 10, 2023
669653f
Smoke/CO: Add test scripts
hare-siterwell Jun 28, 2023
9d6935d
Merge branch 'fix-TLVMeta' into smco_tests
hare-siterwell Jul 10, 2023
a01904e
[SMCO] Update test scripts
hare-siterwell Jul 11, 2023
8f5020c
Merge remote-tracking branch 'upstream/master' into smco_tests
hare-siterwell Jul 12, 2023
247840d
Merge remote-tracking branch 'upstream/master' into smco_tests
hare-siterwell Jul 13, 2023
bc6007c
SMOKECO: Revised document
hare-siterwell Jul 13, 2023
536180d
Merge remote-tracking branch 'upstream/master' into smco_tests
hare-siterwell Jul 14, 2023
fe1c96c
Revised yaml per the documentation
hare-siterwell Jul 14, 2023
658a155
Merge remote-tracking branch 'upstream/master' into smco_tests
hare-siterwell Jul 15, 2023
1a14fa6
Regen zap
hare-siterwell Jul 15, 2023
76cd7ee
Disable all smco tests in Darwin
hare-siterwell Jul 17, 2023
8ebe04d
Merge remote-tracking branch 'upstream/master' into smco_tests
hare-siterwell Jul 17, 2023
4369476
Regen zap
hare-siterwell Jul 17, 2023
39b4b7b
Merge remote-tracking branch 'upstream/master' into smco_tests
hare-siterwell Jul 18, 2023
c735396
Fix PICS
hare-siterwell Jul 19, 2023
4e51848
Merge remote-tracking branch 'upstream/master' into smco_tests
hare-siterwell Jul 20, 2023
fe7a71c
Merge remote-tracking branch 'upstream/master' into smco_tests
hare-siterwell Jul 20, 2023
fee0362
Update test scripts per review comments
hare-siterwell Jul 20, 2023
650370b
Remove Unit Testing Cluster
hare-siterwell Jul 20, 2023
4e1d5fd
Restyled by prettier-yaml
restyled-commits Jul 20, 2023
bc05d3d
Update test scripts per review comments
hare-siterwell Jul 20, 2023
28b453c
Merge remote-tracking branch 'upstream/master' into smco_tests
hare-siterwell Jul 20, 2023
5b65adb
Regen zap
hare-siterwell Jul 20, 2023
52c4c47
Merge remote-tracking branch 'upstream/master' into smco_tests
hare-siterwell Jul 21, 2023
30f51f7
Update test scripts per review comments
hare-siterwell Jul 21, 2023
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
8 changes: 8 additions & 0 deletions examples/darwin-framework-tool/templates/tests/ciTests.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@
"Disabled due to HEPAFilterMonitoring not being enabled in Matter.framework for now:",
"Test_TC_HEPAFREMON_1_1",
"Test_TC_HEPAFREMON_2_1",
"Disabled due to SmokeCOAlarm not being enabled in Matter.framework for now:",
ericzijian1994 marked this conversation as resolved.
Show resolved Hide resolved
"Test_TC_SMCO_1_1",
"Test_TC_SMCO_2_1",
"Test_TC_SMCO_2_2",
"Test_TC_SMCO_2_3",
"Test_TC_SMCO_2_4",
"Test_TC_SMCO_2_5",
"Test_TC_SMCO_2_6",
"Disabled due to Events verification not supported",
"Test_TC_BINFO_2_2"
]
Expand Down
5 changes: 5 additions & 0 deletions scripts/tests/chiptest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ def _GetInDevelopmentTests() -> Set[str]:
"TestCommandsById.yaml", # chip-repl does not support AnyCommands (06/06/2023)
"TestEventsById.yaml", # chip-repl does not support AnyCommands (06/06/2023)
"Test_TC_DRLK_2_8.yaml", # Test fails only in chip-repl: Refer--> https://github.com/project-chip/connectedhomeip/pull/27011#issuecomment-1593339855
"Test_TC_SMCO_2_2.yaml", # chip-repl does not support timeout
ericzijian1994 marked this conversation as resolved.
Show resolved Hide resolved
"Test_TC_SMCO_2_3.yaml", # chip-repl does not support timeout
"Test_TC_SMCO_2_4.yaml", # chip-repl does not support timeout
"Test_TC_SMCO_2_5.yaml", # chip-repl does not support timeout
"Test_TC_SMCO_2_6.yaml", # chip-repl does not support timeout
}


Expand Down
113 changes: 113 additions & 0 deletions src/app/tests/suites/certification/PICS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6289,6 +6289,119 @@ PICS:
- label: "Read all supported mandatory attribute"
id: S.C.AM-READ

# Smoke CO Alarm Cluster Test Plan
- label: "Does the device implement the SMCO cluster as a server?"
id: SMOKECO.S

- label: "Does the device implement the SMCO cluster as a client?"
id: SMOKECO.C

#
# server / features
#
- label: "Does the device support this specific cluster feature?"
id: SMOKECO.S.F00

- label: "Does the device support this specific cluster feature?"
id: SMOKECO.S.F01

#
# server / attributes
#
- label: "Does the device implement the ExpressedState attribute?"
id: SMOKECO.S.A0000

- label: "Does the device implement the SmokeState attribute?"
id: SMOKECO.S.A0001

- label: "Does the device implement the COState attribute?"
id: SMOKECO.S.A0002

- label: "Does the device implement the BatteryAlert attribute?"
id: SMOKECO.S.A0003

- label: "Does the device implement the DeviceMuted attribute?"
id: SMOKECO.S.A0004

- label: "Does the device implement the TestInProgress attribute?"
id: SMOKECO.S.A0005

- label: "Does the device implement the HardwareFaultAlert attribute?"
id: SMOKECO.S.A0006

- label: "Does the device implement the EndOfServiceAlert attribute?"
id: SMOKECO.S.A0007

- label: "Does the device implement the InterconnectSmokeAlarm attribute?"
id: SMOKECO.S.A0008

- label: "Does the device implement the InterconnectCOAlarm attribute?"
id: SMOKECO.S.A0009

- label: "Does the device implement the ContaminationState attribute?"
id: SMOKECO.S.A000a
ericzijian1994 marked this conversation as resolved.
Show resolved Hide resolved

- label: "Does the device implement the SensitivityLevel attribute?"
bzbarsky-apple marked this conversation as resolved.
Show resolved Hide resolved
id: SMOKECO.S.A000b

- label: "Does the device implement the ExpiryDate attribute?"
id: SMOKECO.S.A000c

#
# server / Events
#
- label: "Does the device implement the SmokeAlarm event?"
id: SMOKECO.S.E00

- label: "Does the device implement the COAlarm event?"
id: SMOKECO.S.E01

- label: "Does the device implement the LowBattery event?"
id: SMOKECO.S.E02

- label: "Does the device implement the HardwareFault event?"
id: SMOKECO.S.E03

- label: "Does the device implement the EndOfService event?"
id: SMOKECO.S.E04

- label: "Does the device implement the SelfTestComplete event?"
id: SMOKECO.S.E05

- label: "Does the device implement the AlarmMuted event?"
id: SMOKECO.S.E06

- label: "Does the device implement the MuteEnded event?"
id: SMOKECO.S.E07

- label: "Does the device implement the InterconnectSmokeAlarm event?"
id: SMOKECO.S.E08

- label: "Does the device implement the InterconnectCOAlarm event?"
id: SMOKECO.S.E09

- label: "Does the device implement the AllClear event?"
id: SMOKECO.S.E0a
ericzijian1994 marked this conversation as resolved.
Show resolved Hide resolved

#
# server / manually
#
- label:
"Can the TestInProgress attribute be changed by physical control at
the device?"
id: SMCO.M.ManuallyControlledTest

- label:
"Can the DeviceMuted attribute be changed by physical control at the
device?"
id: SMCO.M.ManuallyControlledMute

#
# server / commandsReceived
#
- label: "Does the device implement receiving the SelfTestRequest command?"
id: SMOKECO.S.C00.Rsp

# Software Diagnostics Cluster Test Plan
- label:
"Does the device implement the Software Diagnostics cluster as a
Expand Down
234 changes: 234 additions & 0 deletions src/app/tests/suites/certification/Test_TC_SMCO_1_1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
# 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: 4.1.1. [TC-SMCO-1.1] Global Attributes with DUT as Server

PICS:
- SMOKECO.S

config:
nodeId: 0x12344321
cluster: "Smoke CO Alarm"
endpoint: 1

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

- label: "TH reads the ClusterRevision attribute from the DUT"
command: "readAttribute"
attribute: "ClusterRevision"
response:
value: 1
constraints:
type: int16u
ericzijian1994 marked this conversation as resolved.
Show resolved Hide resolved

- label: "TH reads from the DUT the FeatureMap attribute(Smoke Alarm)"
PICS: SMOKECO.S.F00
command: "readAttribute"
attribute: "FeatureMap"
response:
constraints:
type: bitmap32
hasMasksSet: [0x1]
ericzijian1994 marked this conversation as resolved.
Show resolved Hide resolved

- label: "TH reads from the DUT the FeatureMap attribute(CO Alarm)"
PICS: SMOKECO.S.F01
command: "readAttribute"
attribute: "FeatureMap"
response:
constraints:
type: bitmap32
hasMasksSet: [0x2]

- label: "TH reads from the DUT the AttributeList attribute"
ericzijian1994 marked this conversation as resolved.
Show resolved Hide resolved
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [0, 3, 5, 6, 7]
ericzijian1994 marked this conversation as resolved.
Show resolved Hide resolved

- label: "TH reads from the DUT the AttributeList attribute(SmokeState)"
PICS: SMOKECO.S.A0001
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [1]

- label: "TH reads from the DUT the AttributeList attribute(COState)"
PICS: SMOKECO.S.A0002
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [2]

- label: "TH reads from the DUT the AttributeList attribute(DeviceMuted)"
PICS: SMOKECO.S.A0004
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [4]

- label:
"TH reads from the DUT the AttributeList
attribute(InterconnectSmokeAlarm)"
PICS: SMOKECO.S.A0008
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [8]

- label:
"TH reads from the DUT the AttributeList
attribute(InterconnectCOAlarm)"
PICS: SMOKECO.S.A0009
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [9]

- label:
"TH reads from the DUT the AttributeList attribute(ContaminationState)"
PICS: SMOKECO.S.A000a
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [10]

- label:
"TH reads from the DUT the AttributeList attribute(SensitivityLevel)"
ericzijian1994 marked this conversation as resolved.
Show resolved Hide resolved
PICS: SMOKECO.S.A000b
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [11]

- label: "TH reads from the DUT the AttributeList attribute(ExpiryDate)"
PICS: SMOKECO.S.A000c
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [12]

- label: "TH reads from the DUT the EventList attribute"
ericzijian1994 marked this conversation as resolved.
Show resolved Hide resolved
command: "readAttribute"
attribute: "EventList"
response:
constraints:
type: list
contains: [2, 3, 4, 5, 10]

- label: "TH reads from the DUT the EventList attribute(SmokeAlarm)"
PICS: SMOKECO.S.E00
command: "readAttribute"
attribute: "EventList"
response:
constraints:
type: list
contains: [0]

- label: "TH reads from the DUT the EventList attribute(COAlarm)"
PICS: SMOKECO.S.E01
command: "readAttribute"
attribute: "EventList"
response:
constraints:
type: list
contains: [1]

- label: "TH reads from the DUT the EventList attribute(AlarmMuted)"
PICS: SMOKECO.S.E06
command: "readAttribute"
attribute: "EventList"
response:
constraints:
type: list
contains: [6]

- label: "TH reads from the DUT the EventList attribute(MuteEnded)"
PICS: SMOKECO.S.E07
command: "readAttribute"
attribute: "EventList"
response:
constraints:
type: list
contains: [7]

- label:
"TH reads from the DUT the EventList attribute(InterconnectSmokeAlarm)"
PICS: SMOKECO.S.E08
command: "readAttribute"
attribute: "EventList"
response:
constraints:
type: list
contains: [8]

- label:
"TH reads from the DUT the EventList attribute(InterconnectCOAlarm)"
PICS: SMOKECO.S.E09
command: "readAttribute"
attribute: "EventList"
response:
constraints:
type: list
contains: [9]

- label: "TH reads from the DUT the AcceptedCommandList attribute"
PICS: "!SMOKECO.S.C00.Rsp"
command: "readAttribute"
attribute: "AcceptedCommandList"
response:
value: []
constraints:
type: list

- label: "TH reads from the DUT the AcceptedCommandList attribute"
PICS: SMOKECO.S.C00.Rsp
command: "readAttribute"
attribute: "AcceptedCommandList"
response:
constraints:
type: list
contains: [0]
ericzijian1994 marked this conversation as resolved.
Show resolved Hide resolved

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