Skip to content

Commit

Permalink
Copy media cluster new automated tests (#32155)
Browse files Browse the repository at this point in the history
* Newly added Media cluster automated tests:
TC_APPOBSERVER_1_13
TC_APPOBSERVER_13_2
TC_MEDIAPLAYBACK_6_8
TC_MEDIAPLAYBACK_6_9

ICDM semi-automated test:
TC_ICDM_3_4

* Auto generated files

* Restyled by whitespace

* Automated tests:
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

* Fix CI failure for Darwin check.

* Fix Mediaplayback script issue in CLI

* Fix CI failure

---------

Co-authored-by: manjunath-grl <manjunath.grl@outlook.com>
Co-authored-by: Restyled.io <commits@restyled.io>
  • Loading branch information
3 people authored and pull[bot] committed May 3, 2024
1 parent 7b9c13a commit e23a9c6
Show file tree
Hide file tree
Showing 24 changed files with 2,546 additions and 842 deletions.
5 changes: 5 additions & 0 deletions scripts/tests/chiptest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ def _GetChipReplUnsupportedTests() -> Set[str]:
"Test_TC_IDM_1_2.yaml", # chip-repl does not support AnyCommands (19/07/2023)
"TestGroupKeyManagementCluster.yaml", # chip-repl does not support EqualityCommands (2023-08-04)
"TestIcdManagementCluster.yaml", # TODO(#30430): add ICD registration support in chip-repl
"Test_TC_ICDM_3_4.yaml", # chip-repl does not support ICD registration
"Test_TC_S_2_2.yaml", # chip-repl does not support EqualityCommands pseudo-cluster
"Test_TC_MOD_3_1.yaml", # chip-repl does not support EqualityCommands pseudo-cluster
"Test_TC_MOD_3_2.yaml", # chip-repl does not support EqualityCommands pseudo-cluster
Expand Down Expand Up @@ -264,6 +265,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
"TestDiagnosticLogsDownloadCommand.yaml", # chip-repl does not implement the bdx download command
}

Expand Down
93 changes: 93 additions & 0 deletions src/app/tests/suites/certification/PICS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4665,6 +4665,21 @@ PICS:
"Does the DUT support the Media Playback server cluster, Seek command?"
id: MEDIAPLAYBACK.S.C0b.Rsp

- label:
"Does the DUT support the Media Playback server cluster,
ActivateAudioTrack command?"
id: MEDIAPLAYBACK.S.C0c.Rsp

- label:
"Does the DUT support the Media Playback server cluster,
ActivateTextTrack command?"
id: MEDIAPLAYBACK.S.C0d.Rsp

- label:
"Does the DUT support the Media Playback server cluster,
DeactivateTextTrack command?"
id: MEDIAPLAYBACK.S.C0e.Rsp

- label:
"Does the DUT support the Audio Output server cluster, SelectOutput
command?"
Expand Down Expand Up @@ -10064,3 +10079,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
53 changes: 33 additions & 20 deletions src/app/tests/suites/certification/Test_TC_APPOBSERVER_13_2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# 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:
19.15.2. [TC-APPOBSERVER-13.2] Content App Message Verification (DUT as
Expand All @@ -22,27 +21,41 @@ PICS:

config:
nodeId: 0x12344321
cluster: "Basic Information"
endpoint: 0
cluster: "Content App Observer"
endpoint: 1

DataValue:
type: char_string
defaultValue: "exampleData"
EncodingHintValue:
type: char_string
defaultValue: "Zoo"

tests:
- label: "Step 1: Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId

- label:
"Step 1: TH sends a ContentAppMessage command to the DUT with dummy
"Step 2: TH sends a ContentAppMessage command to the DUT with dummy
data and encodingHint strings"
PICS: APPOBSERVER.S.C00.Rsp
verification: |
./chip-tool contentappobserver content-app-message foo 1234 1 --Data bar
On TH(chip-tool), The DUT should respond with a ContentAppMessageResponse response with status 0 (success) and optional data and encodingHint strings.
[1705666572.972558][4778:4780] CHIP:DMG: InteractionModelRevision = 11
[1705666572.972584][4778:4780] CHIP:DMG: },
[1705666572.972667][4778:4780] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0510 Command=0x0000_0001
[1705666572.972720][4778:4780] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0510 Command 0x0000_0001
[1705666572.972820][4778:4780] CHIP:TOO: ContentAppMessageResponse: {
[1705666572.972862][4778:4780] CHIP:TOO: status: 0
[1705666572.972888][4778:4780] CHIP:TOO: data: exampleData
[1705666572.972912][4778:4780] CHIP:TOO: encodingHint: foo
[1705666572.972936][4778:4780] CHIP:TOO: }
[1705666572.972989][4778:4780] CHIP:DMG: ICR moving to [AwaitingDe]
[1705666572.973210][4778:4780] CHIP:EM: <<< [E:743i S:54358 M:87646250 (Ack:136640189)] (S) Msg TX to 1:0000000000000001 [A5ED] [UDP:[fe80::e65f:1ff:fe0f:1a01%wlan0]:5540] --- Type 0000:10 (SecureChannel:StandaloneAck)
[1705666572.973340][4778:4780] CHIP:EM: Flushed pending ack for MessageCounter:136640189 on exchange 743i
disabled: true
command: "ContentAppMessage"
arguments:
values:
- name: "Data"
value: DataValue
- name: "EncodingHint"
value: EncodingHintValue
response:
values:
- name: "Status"
value: 0
- name: "Data"
value: DataValue
- name: "EncodingHint"
value: EncodingHintValue
116 changes: 58 additions & 58 deletions src/app/tests/suites/certification/Test_TC_APPOBSERVER_1_13.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024 Project CHIP Authors
# 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.
Expand All @@ -22,73 +22,73 @@ PICS:

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

tests:
- label: "Step 0: Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId

- label: "Step 1: TH reads the ClusterRevision attribute from the DUT"
verification: |
./chip-tool contentappobserver read cluster-revision 1 1
Verify " ClusterRevision " value is of unit16 and reflects the highest revision number on the TH(Chip-tool) Log, in RPI the value of ClusterRevision is 1
[1702624923.223245][5892:5894] CHIP:DMG: InteractionModelRevision = 11
[1702624923.223299][5892:5894] CHIP:DMG: }
[1702624923.223652][5892:5894] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0510 Attribute 0x0000_FFFD DataVersion: 2272699478
[1702624923.223820][5892:5894] CHIP:TOO: ClusterRevision: 1
[1702624923.224324][5892:5894] CHIP:EM: <<< [E:5445i S:15084 M:255037238 (Ack:113660697)] (S) Msg TX to 1:0000000000000001 [EDAD] [UDP:[fe80::e65f:1ff:fe49:ae1a%wlan0]:5640] --- Type 0000:10 (SecureChannel:StandaloneAck)
[1702624923.224578][5892:5894] CHIP:EM: Flushed pending ack for MessageCounter:113660697 on exchange 5445i
disabled: true
command: "readAttribute"
attribute: "ClusterRevision"
response:
value: 1
constraints:
type: int16u

- label: "Step 2: TH reads the FeatureMap attribute from the DUT"
verification: |
./chip-tool contentappobserver read feature-map 1 1
On TH, verify that DUT sends the FeatureMap attribute has the value 0 or returns a general error that the attribute is not supported
[1702624956.728609][5896:5898] CHIP:DMG: SuppressResponse = true,
[1702624956.728667][5896:5898] CHIP:DMG: InteractionModelRevision = 11
[1702624956.728720][5896:5898] CHIP:DMG: }
[1702624956.729021][5896:5898] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0510 Attribute 0x0000_FFFC DataVersion: 2272699478
[1702624956.729138][5896:5898] CHIP:TOO: FeatureMap: 0
[1702624956.729564][5896:5898] CHIP:EM: <<< [E:26717i S:26806 M:11352307 (Ack:31492418)] (S) Msg TX to 1:0000000000000001 [EDAD] [UDP:[fe80::e65f:1ff:fe49:ae1a%wlan0]:5640] --- Type 0000:10 (SecureChannel:StandaloneAck)
disabled: true
command: "readAttribute"
attribute: "FeatureMap"
response:
value: 0
constraints:
type: bitmap32

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

- label: "Step 3: TH reads the AttributeList attribute from the DUT"
verification: |
./chip-tool contentappobserver read attribute-list 1 1
Verify " AttributeList " value consists the list of mandatory attributes (65533, 65532, 65531, 65529, 65528) on the TH(Chip-tool) Log:
[1702624983.367693][5900:5902] CHIP:DMG: }
[1702624983.368044][5900:5902] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0510 Attribute 0x0000_FFFB DataVersion: 2272699478
[1702624983.368485][5900:5902] CHIP:TOO: AttributeList: 5 entries
[1702624983.368564][5900:5902] CHIP:TOO: [1]: 65528
[1702624983.368624][5900:5902] CHIP:TOO: [2]: 65529
[1702624983.368683][5900:5902] CHIP:TOO: [3]: 65531
[1702624983.368741][5900:5902] CHIP:TOO: [4]: 65532
[1702624983.368798][5900:5902] CHIP:TOO: [5]: 65533
[1702624983.369236][5900:5902] CHIP:EM: <<< [E:55491i S:35892 M:103959395 (Ack:145764997)] (S) Msg TX to 1:0000000000000001 [EDAD] [UDP:[fe80::e65f:1ff:fe49:ae1a%wlan0]:5640] --- Type 0000:10 (SecureChannel:StandaloneAck)
disabled: true
PICS: "!PICS_EVENT_LIST_ENABLED"
command: "readAttribute"
attribute: "AttributeList"
response:
constraints:
type: list
contains: [65528, 65529, 65531, 65532, 65533]

- label: "Step 4: TH reads the AcceptedCommandList attribute from the DUT"
verification: |
./chip-tool contentappobserver read accepted-command-list 1 1
Verify " AcceptedCommandList " consists the list of mandatory commands(0)on the TH(Chip-tool) Log:
[1702625012.494394][5905:5907] CHIP:DMG: }
[1702625012.494619][5905:5907] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0510 Attribute 0x0000_FFF9 DataVersion: 2272699478
[1702625012.494697][5905:5907] CHIP:TOO: AcceptedCommandList: 1 entries
[1702625012.494725][5905:5907] CHIP:TOO: [1]: 0
[1702625012.494981][5905:5907] CHIP:EM: <<< [E:43961i S:9805 M:165451447 (Ack:180558712)] (S) Msg TX to 1:0000000000000001 [EDAD] [UDP:[fe80::e65f:1ff:fe49:ae1a%wlan0]:5640] --- Type 0000:10 (SecureChannel:StandaloneAck)
disabled: true
command: "readAttribute"
attribute: "AcceptedCommandList"
response:
constraints:
type: list
contains: [0]

- label: "Step 5: TH reads the GeneratedCommandList attribute from the DUT"
verification: |
./chip-tool contentappobserver read generated-command-list 1 1
Verify " GeneratedCommandList " consists the list of mandatory commands(1) on the TH(Chip-tool) Log:
[1702625044.200661][5910:5912] CHIP:DMG: }
[1702625044.201052][5910:5912] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0510 Attribute 0x0000_FFF8 DataVersion: 2272699478
[1702625044.201230][5910:5912] CHIP:TOO: GeneratedCommandList: 1 entries
[1702625044.201298][5910:5912] CHIP:TOO: [1]: 1
[1702625044.201724][5910:5912] CHIP:EM: <<< [E:33891i S:27945 M:56965554 (Ack:52573112)] (S) Msg TX to 1:0000000000000001 [EDAD] [UDP:[fe80::e65f:1ff:fe49:ae1a%wlan0]:5640] --- Type 0000:10 (SecureChannel:StandaloneAck)
[1702625044.201956][5910:5912] CHIP:EM: Flushed pending ack for MessageCounter:52573112 on exchange 33891i
disabled: true
command: "readAttribute"
attribute: "GeneratedCommandList"
response:
constraints:
type: list
contains: [1]

- label: "Step 6: TH reads the EventList attribute from the DUT"
verification: |
./chip-tool contentappobserver read event-list 1 1
disabled: true
PICS: PICS_EVENT_LIST_ENABLED
command: "readAttribute"
attribute: "EventList"
response:
value: []
constraints:
type: list
Loading

0 comments on commit e23a9c6

Please sign in to comment.