Skip to content

Commit

Permalink
Edits to follow better syntax provided in https://github.com/abpoth/c…
Browse files Browse the repository at this point in the history
  • Loading branch information
abpoth committed Jul 15, 2023
1 parent 0e87d2f commit 2358932
Show file tree
Hide file tree
Showing 6 changed files with 161 additions and 91 deletions.
15 changes: 2 additions & 13 deletions src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,28 +116,17 @@ tests:
contains: [5]

- label: "TH reads AcceptedCommandList from DUT"
PICS: " !DISHM.S.F02"
command: "readAttribute"
attribute: "AcceptedCommandList"
response:
constraints:
type: list
contains: [0, 1]

- label: "TH reads AcceptedCommandList from DUT"
PICS: DISHM.S.F01
command: "readAttribute"
attribute: "AcceptedCommandList"
response:
constraints:
type: list
contains: [1]
contains: [0]

- label: "Read the global attribute: GeneratedCommandList"
PICS: DISHM.S.F01
command: "readAttribute"
attribute: "GeneratedCommandList"
response:
value: [2]
value: []
constraints:
type: list
21 changes: 14 additions & 7 deletions src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ PICS:
- DISHM.S

config:
nodeId: 0x12344321
cluster: "Dishwasher Mode Select"
nodeId: 0x0059
cluster: "Dishwasher Mode"
endpoint: 1

tests:
Expand All @@ -37,7 +37,10 @@ tests:
command: "readAttribute"
attribute: "SupportedModes"
response:
saveAs: "supported_modes_dut"
values:
- name: "Mode"
saveAs: supported_modes_dut
value: [0, 1, 2]
constraints:
type: list

Expand All @@ -46,32 +49,36 @@ tests:
command: "readAttribute"
attribute: "CurrentMode"
response:
value: 0
constraints:
type: int16u
value: supported_modes_dut


- label: "TH reads the OnMode attribute from the DUT"
PICS: DISHM.S.A0005
command: "readAttribute"
attribute: "OnMode"
response:
value: supported_modes_dut
constraints:
type: int16u
value: supported_modes_dut


- label: "TH reads the StartUpMode attribute from the DUT"
PICS: DISHM.S.A0004
command: "readAttribute"
attribute: "StartUpMode"
response:
value: supported_modes_dut
constraints:
type: int16u
value: supported_modes_dut


- label: "TH reads the Description attribute from the DUT"
PICS: DISHM.S.A0000
command: "readAttribute"
attribute: "Description"
response:
value: ""
constraints:
type: string
type: char_string
61 changes: 44 additions & 17 deletions src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,15 @@ PICS:
- DISHM.S

config:
nodeId: 0x12344321
cluster: "Dishwasher Mode Select"
nodeId: 0x0059
cluster: "Dishwasher Mode"
endpoint: 1
new_mode_th:
type: INT16U
defaultValue: 1
invalid_mode_th:
type: INT16U
defaultValue: 3

tests:
- label: "Wait for the commissioned device to be retrieved"
Expand All @@ -37,7 +43,10 @@ tests:
command: "readAttribute"
attribute: "SupportedModes"
response:
saveAs: "supported_modes_dut"
values:
- name: "Mode"
saveAs: supported_modes_dut
value: [0, 1, 2]
constraints:
type: list

Expand All @@ -46,41 +55,59 @@ tests:
command: "readAttribute"
attribute: "CurrentMode"
response:
saveAs: "old_current_mode_dut"
values:
- name: "old_current_mode_dut"
saveAs: old_current_mode_dut
value: 0
constraints:
type: int16u
new_mode_th: 16385
invalid_mode_th: 16387

- label: "TH send a ChangeToMode command to the DUT with NewMode set to old_current_mode_dut"
PICS: DISHM.S.C01.Rsp
command: "changeToMode"
attribute: old_current_mode_dut
command: "writeAttribute"
attribute: "ChangeToMode"
arguments:
values:
- name: "arg1"
value: old_current_mode_dut
response:
constraints:
type: string
value: 2
value: ""
constraints:
type: char_string


- label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th"
PICS: DISHM.S.C01.Rsp
command: "changeToMode"
attribute: new_mode_th
command: "writeAttribute"
attribute: "ChangeToMode"
arguments:
values:
- name: "arg1"
value: new_mode_th

- label: "TH reads the CurrentMode attribute from the DUT"
PICS: DISHM.S.A0003
command: "readAttribute"
attribute: "CurrentMode"
response:
values:
- name: "new_mode_th"
value: new_mode_th
constraints:
type: int16u
value: new_mode_th



- label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th"
PICS: DISHM.S.C01.Rsp
command: "changeToMode"
attribute: invalid_mode_th
command: "writeAttribute"
attribute: "ChangeToMode"
arguments:
values:
- name: "arg1"
value: invalid_mode_th
response:
value: 1
constraints:
type: int16u
value: 1

48 changes: 26 additions & 22 deletions src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ PICS:
- DISHM.S

config:
nodeId: 0x12344321
cluster: "Dishwasher Mode Select"
nodeId: 0x0059
cluster: "Dishwasher Mode"
endpoint: 1
new_mode_th:
type: INT16U
defaultValue: 2

tests:
- label: "Wait for the commissioned device to be retrieved"
Expand All @@ -32,7 +35,10 @@ tests:
command: "readAttribute"
attribute: "OnMode"
response:
saveAs: "on_mode_dut"
values:
- name: "on_mode_dut"
saveAs: on_mode_dut
value: 0
constraints:
type: int16u

Expand All @@ -41,7 +47,10 @@ tests:
command: "readAttribute"
attribute: "CurrentMode"
response:
saveAs: "old_current_mode_dut"
values:
- name: "old_current_mode_dut"
saveAs: old_current_mode_dut
value: 1
constraints:
type: int16u

Expand All @@ -50,42 +59,37 @@ tests:
command: "readAttribute"
attribute: "SupportedModes"
response:
saveAs: "supported_modes_dut"
new_mode_th: 16385
values:
- name: "Mode"
saveAs: supported_modes_dut
value: [0, 1, 2]
constraints:
type: list


- label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th"
PICS: DISHM.S.C00.Rsp && DISHM.S.F00
command: "changeToMode"
attribute: new_mode_th
response:
constraints:
type: int16u
value: 0
command: "writeAttribute"
attribute: "ChangeToMode"
arguments:
values:
- name: "arg1"
value: new_mode_th

- label: "TH sends Off Command to DUT"
PICS: OO.S.C00.Rsp && DISHM.S.F00
command: "Off"
response:
constraints:
type: int16u
value: 0

- label: "TH sends On Command to DUT"
PICS: OO.S.C01.Rsp && DISHM.S.F00
command: "On"
response:
constraints:
type: int16u
value: 0

- label: "TH reads the CurrentMode attribute from the DUT"
PICS: DISHM.S.A0003 && DISHM.S.F00
command: "readAttribute"
attribute: "CurrentMode"
response:
constraints:
value: new_mode_th
constraints:
type: int16u
value: old_current_mode_dut

49 changes: 35 additions & 14 deletions src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ PICS:
- DISHM.S

config:
nodeId: 0x12344321
cluster: "Dishwasher Mode Select"
nodeId: 0x0059
cluster: "Dishwasher Mode"
endpoint: 1
new_mode_th:
type: INT16U
defaultValue: 0

tests:
- label: "Wait for the commissioned device to be retrieved"
Expand All @@ -32,7 +35,10 @@ tests:
command: "readAttribute"
attribute: "StartUpMode"
response:
saveAs: "startup_mode_dut"
values:
- name: "startup_mode_dut"
saveAs: startup_mode_dut
value: 0
constraints:
type: int16u

Expand All @@ -41,7 +47,10 @@ tests:
command: "readAttribute"
attribute: "CurrentMode"
response:
saveAs: "old_current_mode_dut"
values:
- name: "old_current_mode_dut"
saveAs: old_current_mode_dut
value: 2
constraints:
type: int16u

Expand All @@ -50,28 +59,40 @@ tests:
command: "readAttribute"
attribute: "SupportedModes"
response:
saveAs: "supported_modes_dut"
new_mode_th: 16385
values:
- name: "Mode"
saveAs: supported_modes_dut
value: [0, 1, 2]
constraints:
type: list


- label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th"
PICS: DISHM.S.C00.Rsp && DISHM.S.F00
command: "changeToMode"
attribute: new_mode_th
response:
constraints:
type: int16u
value: 0
command: "writeAttribute"
attribute: "ChangeToMode"
arguments:
values:
- name: "arg1"
value: new_mode_th

# Physically power cycle the device
- label: "Powercycle on device to set OnOff attribute manually to on"
cluster: "LogCommands"
command: "UserPrompt"
PICS: PICS_USER_PROMPT
arguments:
values:
- name: "message"
value: "Please enter 'y' for success"
- name: "expectedValue"
value: "y"

- label: "TH reads the CurrentMode attribute from the DUT"
PICS: DISHM.S.A0003
command: "readAttribute"
attribute: "CurrentMode"
response:
value: startup_mode_dut
constraints:
type: int16u
value: startup_mode_dut

Loading

0 comments on commit 2358932

Please sign in to comment.