Skip to content

Commit

Permalink
Updated OnOff Test script according most recent test plan. (#32306)
Browse files Browse the repository at this point in the history
* updated on off test scripts according test plan

* added missing CI Pics

* updated cluster revision

* Restyled by prettier-yaml

* update label

* Restyled by prettier-yaml

* Added missing pics

* fix yaml

---------

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed May 29, 2024
1 parent 895316e commit 565a969
Show file tree
Hide file tree
Showing 7 changed files with 183 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7761,7 +7761,7 @@ endpoint 1 {
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0x0001;
ram attribute clusterRevision default = 5;
ram attribute clusterRevision default = 6;

handle command Off;
handle command On;
Expand Down Expand Up @@ -9134,7 +9134,7 @@ endpoint 2 {
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0x0001;
ram attribute clusterRevision default = 5;
ram attribute clusterRevision default = 6;

handle command Off;
handle command On;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6659,7 +6659,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "5",
"defaultValue": "6",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down Expand Up @@ -6895,7 +6895,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "5",
"defaultValue": "6",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down Expand Up @@ -23993,7 +23993,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "5",
"defaultValue": "6",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
3 changes: 3 additions & 0 deletions src/app/tests/suites/certification/PICS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5294,6 +5294,9 @@ PICS:
- label: "Device has Deadfront behaviour"
id: OO.S.F01

- label: "Device has OffOnly feature"
id: OO.S.F02

#
# server / manually
#
Expand Down
90 changes: 80 additions & 10 deletions src/app/tests/suites/certification/Test_TC_OO_1_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,38 +38,75 @@ tests:
command: "readAttribute"
attribute: "ClusterRevision"
response:
value: 5
value: 6
constraints:
type: int16u

- label: "Step 3a: TH reads from the DUT the FeatureMap attribute."
- label:
"Step 3a: Given OO.S.F00(LT) ensure featuremap has the correct bit set"
command: "readAttribute"
attribute: "FeatureMap"
PICS: ( !OO.S.F00 && !OO.S.F01 )
PICS: ( OO.S.F00 && !OO.S.F02 )
response:
value: 0
constraints:
type: bitmap32

hasMasksSet: [0x1]
- label:
"Step 3b: Given OO.S.F00(LT) ensure featuremap has the correct bit set"
command: "readAttribute"
attribute: "FeatureMap"
PICS: OO.S.F00
PICS: ( !( OO.S.F00 && !OO.S.F02 ) )
response:
constraints:
type: bitmap32
hasMasksSet: [0x1]
hasMasksClear: [0x1]

- label:
"Step 3c: Given OO.S.F01(DF) ensure featuremap has the correct bit set"
command: "readAttribute"
attribute: "FeatureMap"
PICS: OO.S.F01
PICS: ( OO.S.F01 && !OO.S.F02 )
response:
constraints:
type: bitmap32
hasMasksSet: [0x2]
- label:
"Step 3d: Given OO.S.F01(DF) ensure featuremap has the correct bit set"
command: "readAttribute"
attribute: "FeatureMap"
PICS: ( !( OO.S.F01 && !OO.S.F02 ) )
response:
constraints:
type: bitmap32
hasMasksClear: [0x2]

- label:
"Step 3e: Given OO.S.F02(OFFONLY) TH reads from the DUT the FeatureMap
attribute."
command: "readAttribute"
attribute: "FeatureMap"
PICS: ( OO.S.F02 && !OO.S.F00 && !OO.S.F01 )
response:
constraints:
type: bitmap32
hasMasksSet: [0x4]
- label:
"Step 3f: Given OO.S.F02(OFFONLY) TH reads from the DUT the FeatureMap
attribute."
command: "readAttribute"
attribute: "FeatureMap"
PICS: ( !( OO.S.F02 && !OO.S.F00 && !OO.S.F01 ) )
response:
constraints:
type: bitmap32
hasMasksClear: [0x4]
- label: "Step 3g: All remaining shall be zero"
command: "readAttribute"
attribute: "FeatureMap"
response:
constraints:
type: bitmap32
hasMasksClear: [0xFFFFFFF8]

- label: "Step 4a: TH reads from the DUT the AttributeList attribute."
PICS: PICS_EVENT_LIST_ENABLED
Expand Down Expand Up @@ -115,10 +152,32 @@ tests:
response:
constraints:
type: list
contains: [0, 1, 2]
contains: [0]

- label:
"Step 6b: TH reads the feature dependent(OO.S.F02) commands in
AcceptedCommandList"
command: "readAttribute"
attribute: "AcceptedCommandList"
PICS: ( !OO.S.F02 )
response:
constraints:
type: list
contains: [1, 2]

- label:
"Step 6c: TH reads the feature dependent(OO.S.F02) commands in
AcceptedCommandList"
command: "readAttribute"
attribute: "AcceptedCommandList"
PICS: OO.S.F02
response:
constraints:
type: list
excludes: [1, 2]

- label:
"Step 6b: TH reads the feature dependent(OO.S.F00) commands in
"Step 6d: TH reads the feature dependent(OO.S.F00) commands in
AcceptedCommandList"
command: "readAttribute"
attribute: "AcceptedCommandList"
Expand All @@ -128,6 +187,17 @@ tests:
type: list
contains: [64, 65, 66]

- label:
"Step 6e: TH reads the feature dependent(OO.S.F00) commands in
AcceptedCommandList"
command: "readAttribute"
attribute: "AcceptedCommandList"
PICS: ( !OO.S.F00 )
response:
constraints:
type: list
excludes: [64, 65, 66]

- label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute."
command: "readAttribute"
attribute: "GeneratedCommandList"
Expand Down
52 changes: 50 additions & 2 deletions src/app/tests/suites/certification/Test_TC_OO_2_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,70 @@ tests:
command: "readAttribute"
attribute: "OnTime"
response:
saveAs: initialOnTime
constraints:
type: int16u
minValue: 0
maxValue: 65535

- label: "Step 5: TH reads the OffWaitTime attribute from the DUT"
- label: "Step 5: TH writes the OnTime attribute as 30"
PICS: OO.S.A4001
command: "writeAttribute"
attribute: "OnTime"
arguments:
value: 30

- label: "Step 6: TH reads the OnTime attribute from the DUT"
PICS: OO.S.A4001
command: "readAttribute"
attribute: "OnTime"
response:
value: 30

- label:
"Step 7: TH writes the OnTime attribute as 'initial-On-time' to
restore the original value"
PICS: OO.S.A4001
command: "writeAttribute"
attribute: "OnTime"
arguments:
value: initialOnTime

- label: "Step 8: TH reads the OffWaitTime attribute from the DUT"
PICS: OO.S.A4002
command: "readAttribute"
attribute: "OffWaitTime"
response:
saveAs: initialOffWaitTime
constraints:
type: int16u
minValue: 0
maxValue: 65535

- label: "Step 6: TH reads the StartUpOnOff attribute from the DUT"
- label: "Step 9: TH writes the OffWaitTime attribute as 30"
PICS: OO.S.A4002
command: "writeAttribute"
attribute: "OffWaitTime"
arguments:
value: 30

- label: "Step 10: TH reads the OffWaitTime attribute from the DUT"
PICS: OO.S.A4002
command: "readAttribute"
attribute: "OffWaitTime"
response:
value: 30

- label:
"Step 11: TH writes the OffWaitTime attribute as
'initial-Off-waittime' to restore the original value"
PICS: OO.S.A4002
command: "writeAttribute"
attribute: "OffWaitTime"
arguments:
value: initialOffWaitTime

- label: "Step 12: TH reads the StartUpOnOff attribute from the DUT"
PICS: OO.S.A4003
command: "readAttribute"
attribute: "StartUpOnOff"
Expand Down
59 changes: 44 additions & 15 deletions src/app/tests/suites/certification/Test_TC_OO_2_2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ tests:
PICS: OO.S.C00.Rsp
command: "Off"

- label: "Wait 1000ms"
cluster: "DelayCommands"
command: "WaitForMs"
arguments:
values:
- name: "ms"
value: 1000

- label: "Step 2b: after a few seconds, TH reads OnOff attribute from DUT"
PICS: OO.S.A0000
command: "readAttribute"
Expand All @@ -46,6 +54,14 @@ tests:
PICS: OO.S.C01.Rsp
command: "On"

- label: "Wait 1000ms"
cluster: "DelayCommands"
command: "WaitForMs"
arguments:
values:
- name: "ms"
value: 1000

- label: "Step 3b: after a few seconds, TH reads OnOff attribute from DUT"
PICS: OO.S.A0000
command: "readAttribute"
Expand All @@ -57,6 +73,14 @@ tests:
PICS: OO.S.C01.Rsp
command: "On"

- label: "Wait 1000ms"
cluster: "DelayCommands"
command: "WaitForMs"
arguments:
values:
- name: "ms"
value: 1000

- label: "Step 3d: after a few seconds, TH reads OnOff attribute from DUT"
PICS: OO.S.A0000
command: "readAttribute"
Expand All @@ -68,6 +92,14 @@ tests:
PICS: OO.S.C00.Rsp
command: "Off"

- label: "Wait 1000ms"
cluster: "DelayCommands"
command: "WaitForMs"
arguments:
values:
- name: "ms"
value: 1000

- label: "Step 4b: after a few seconds, TH reads OnOff attribute from DUT"
PICS: OO.S.A0000
command: "readAttribute"
Expand All @@ -79,14 +111,22 @@ tests:
PICS: OO.S.C00.Rsp
command: "Off"

- label: "Wait 1000ms"
cluster: "DelayCommands"
command: "WaitForMs"
arguments:
values:
- name: "ms"
value: 1000

- label: "Step 4d: after a few seconds, TH reads OnOff attribute from DUT"
PICS: OO.S.A0000
command: "readAttribute"
attribute: "OnOff"
response:
value: 0

- label: "Step 5c: TH sends Toggle command to DUT"
- label: "Step 5a: TH sends Toggle command to DUT"
PICS: OO.S.C02.Rsp
command: "Toggle"

Expand All @@ -98,14 +138,14 @@ tests:
- name: "ms"
value: 1000

- label: "Step 5d: after a few seconds, TH reads OnOff attribute from DUT"
- label: "Step 5b: after a few seconds, TH reads OnOff attribute from DUT"
PICS: OO.S.A0000
command: "readAttribute"
attribute: "OnOff"
response:
value: 1

- label: "TH sends Toggle command to DUT"
- label: "Step 5c: TH sends Toggle command to DUT"
PICS: OO.S.C02.Rsp
command: "Toggle"

Expand All @@ -117,7 +157,7 @@ tests:
- name: "ms"
value: 1000

- label: "Check on/off attribute value is false after toggle command"
- label: "Step 5d: after a few seconds, TH reads OnOff attribute from DUT"
PICS: OO.S.A0000
command: "readAttribute"
attribute: "OnOff"
Expand Down Expand Up @@ -161,14 +201,3 @@ tests:
attribute: "OnOff"
response:
value: 0

- label: "Reset Off Command"
PICS: OO.S.C00.Rsp
command: "Off"

- label: "Check on/off attribute value is false after off command"
PICS: OO.S.A0000
command: "readAttribute"
attribute: "OnOff"
response:
value: 0
1 change: 1 addition & 0 deletions src/app/tests/suites/certification/ci-pics-values
Original file line number Diff line number Diff line change
Expand Up @@ -1211,6 +1211,7 @@ OO.S.C41.Rsp=1
OO.S.C42.Rsp=1
OO.S.F00=1
OO.S.F01=0
OO.S.F02=0
OO.S.A4003=1
OO.M.ManuallyControlled=1

Expand Down

0 comments on commit 565a969

Please sign in to comment.