Skip to content

Commit

Permalink
Improve occupancy testing cluster tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fessehaeve authored and woody-apple committed Aug 10, 2022
1 parent 397d642 commit 6b04a5b
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 35 deletions.
2 changes: 1 addition & 1 deletion src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ tests:
constraints:
type: bitmap8
minValue: 1
maxValue: 273
maxValue: 7

- label: "Reads optional attribute: PIROccupiedToUnoccupiedDelay"
PICS: OCC.S.A0010
Expand Down
4 changes: 2 additions & 2 deletions src/app/tests/suites/certification/Test_TC_OCC_2_2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ PICS:

config:
nodeId: 0x12344321
cluster: "Basic"
endpoint: 0
cluster: "Occupancy Sensing"
endpoint: 1

tests:
- label: "Commission DUT to TH"
Expand Down
54 changes: 27 additions & 27 deletions src/app/tests/suites/certification/Test_TC_OCC_2_3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,34 @@ PICS:

config:
nodeId: 0x12344321
cluster: "Basic"
endpoint: 0
cluster: "Occupancy Sensing"
endpoint: 1

tests:
- label: "Commission DUT to TH"
verification: |
verification step to be updated.
disabled: true

- label: "TH reads OccupancySensorType attribute from DUT"
- label: "Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId

- label: "Reads mandatory attribute constrains: OccupancySensorType"
PICS: OCC.S.A0001
verification: |
./chip-tool occupancysensing read occupancy-sensor-type 1 1
on TH , Verify that the DUT response contains a non-reserved value:
[1648461912.765825][9300:9306] CHIP:DMG: }
[1648461912.766013][9300:9306] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0406 Attribute 0x0000_0001 DataVersion: 3082917122
[1648461912.766089][9300:9306] CHIP:TOO: occupancy sensor type: 0
disabled: true

- label: "TH reads OccupancySensorTypeBitmap attribute from DUT"
command: "readAttribute"
attribute: "occupancy sensor type"
response:
constraints:
type: enum8
minValue: 0
maxValue: 3

- label: "Reads mandatory attribute constrains: OccupancySensorTypeBitmap"
PICS: OCC.S.A0002
verification: |
./chip-tool occupancysensing read occupancy-sensor-type-bitmap 1 1
on TH , Verify that the DUT response contains a bitmap value:
[1648461918.499009][9307:9312] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0406 Attribute 0x0000_0002 DataVersion: 3082917122
[1648461918.499082][9307:9312] CHIP:TOO: occupancy sensor type bitmap: 1
disabled: true
command: "readAttribute"
attribute: "occupancy sensor type bitmap"
response:
constraints:
type: bitmap8
minValue: 1
maxValue: 7
4 changes: 2 additions & 2 deletions src/app/tests/suites/certification/Test_TC_OCC_2_4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ PICS:

config:
nodeId: 0x12344321
cluster: "Basic"
endpoint: 0
cluster: "Occupancy Sensing"
endpoint: 1

tests:
- label: "Commission DUT to TH"
Expand Down
47 changes: 45 additions & 2 deletions zzz_generated/chip-tool/zap-generated/test/Commands.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6b04a5b

Please sign in to comment.