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

Changed times and hue steps in TC-CC-3.3 so tolerance does not span wrap #37308

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
99 changes: 38 additions & 61 deletions src/app/tests/suites/certification/Test_TC_CC_3_3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,64 +80,51 @@ tests:
- name: "StepMode"
value: 1
- name: "StepSize"
value: 60
value: 80
- name: "TransitionTime"
value: 200
- name: "OptionsMask"
value: 0
- name: "OptionsOverride"
value: 0

- label: "Wait 10s"
- label: "Wait 5s"
PICS: CC.S.F00
cluster: "DelayCommands"
command: "WaitForMs"
arguments:
values:
- name: "ms"
value: 10000
value: 5000

- label: "Step 2c: TH reads CurrentHue attribute from DUT"
- label: "Step 2c: TH reads CurrentHue attribute from DUT" # Expects 220 (200 + 80*(5/20)) with a tolerance of +/- 3 (15% of 20), so the expected value is in the range (217, 221)
PICS: CC.S.F00 && CC.S.A0000
command: "readAttribute"
attribute: "CurrentHue"
response:
constraints:
minValue: 195
maxValue: 254
minValue: 217
maxValue: 223

- label: "Wait 10s"
- label: "Wait 15s"
PICS: CC.S.F00
cluster: "DelayCommands"
command: "WaitForMs"
arguments:
values:
- name: "ms"
value: 10000
value: 15000

#Tolerance to be computed from the range
#Start value 230, expected value 5, 230 - 5 = 225, 225 % 15 = 34 , So 5+/-34 We need two range here as 254 is the max value
#Range will be: 230...254...0...39
#Multiple range not supported in YAML: https://github.com/project-chip/connectedhomeip/issues/23197
# Start value 220, expected value 25 (200 + 80*(20/20) = 280 mod 255) with a tolerance of +/- 12 (15% of 80), so the expected value is in the range (13, 37)
# Multiple range not supported in YAML: https://github.com/project-chip/connectedhomeip/issues/23197
- label: "Step 2d: TH reads CurrentHue attribute from DUT"
PICS: CC.S.F00 && CC.S.A0000 && PICS_SKIP_SAMPLE_APP
verification: |
./chip-tool colorcontrol read current-hue 1 1

After another 10 seconds , Verify that CurrentHue value is 5 On TH(chip-tool) Logs and below is the sample log provided for the raspi platform

[1649662328.012887][8447:8452] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0000 DataVersion: 4087279986
[1649662328.012957][8447:8452] CHIP:TOO: Current hue: 5
[1649662328.013055][8447:8452] CHIP:EM: Sending Standalone Ack for MessageCounter:8634142 on exchange 13871i
(Value can vary)
cluster: "LogCommands"
command: "UserPrompt"
arguments:
values:
- name: "message"
value: "Enter 'y' after success"
- name: "expectedValue"
value: "y"
PICS: CC.S.F00 && CC.S.A0000
command: "readAttribute"
attribute: "CurrentHue"
response:
constraints:
minValue: 13
maxValue: 37

- label: "Wait 5s"
PICS: CC.S.F00
Expand All @@ -148,25 +135,15 @@ tests:
- name: "ms"
value: 5000

#Multiple range not supported in YAML: https://github.com/project-chip/connectedhomeip/issues/23197
# Multiple range not supported in YAML: https://github.com/project-chip/connectedhomeip/issues/23197
- label: "Step 2e: TH reads CurrentHue attribute from DUT"
PICS: CC.S.F00 && CC.S.A0000 && PICS_SKIP_SAMPLE_APP
verification: |
./chip-tool colorcontrol read current-hue 1 1

After another 5 seconds , Verify that CurrentHue value is 5 On TH(chip-tool) Logs and below is the sample log provided for the raspi platform

[1649662328.012887][8447:8452] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0000 DataVersion: 4087279986
[1649662328.012957][8447:8452] CHIP:TOO: Current hue: 5
[1649662328.013055][8447:8452] CHIP:EM: Sending Standalone Ack for MessageCounter:8634142 on exchange 13871i
cluster: "LogCommands"
command: "UserPrompt"
arguments:
values:
- name: "message"
value: "Enter 'y' after success"
- name: "expectedValue"
value: "y"
PICS: CC.S.F00 && CC.S.A0000
command: "readAttribute"
attribute: "CurrentHue"
response:
constraints:
minValue: 13
maxValue: 37

- label:
"Step 3a: TH sends MoveToHue command to DUT with Hue=50,
Expand Down Expand Up @@ -205,49 +182,49 @@ tests:
- name: "StepMode"
value: 3
- name: "StepSize"
value: 60
value: 100
- name: "TransitionTime"
value: 200
- name: "OptionsMask"
value: 0
- name: "OptionsOverride"
value: 0

- label: "Wait 10s"
- label: "Wait 5s"
PICS: CC.S.F00
cluster: "DelayCommands"
command: "WaitForMs"
arguments:
values:
- name: "ms"
value: 10000
value: 5000

- label: "Step 3c: TH reads CurrentHue attribute from DUT"
- label: "Step 3c: TH reads CurrentHue attribute from DUT" # Expects 25 (50 - 100*(5/20)) with a tolerance of +/- 4 (15% of 25), so the expected value is in the range (21, 29)
PICS: CC.S.F00 && CC.S.A0000
command: "readAttribute"
attribute: "CurrentHue"
response:
constraints:
minValue: 17
maxValue: 23
minValue: 21
maxValue: 29

- label: "Wait 10s"
- label: "Wait 15s"
PICS: CC.S.F00
cluster: "DelayCommands"
command: "WaitForMs"
arguments:
values:
- name: "ms"
value: 10000
value: 15000

- label: "Step 3d: TH reads CurrentHue attribute from DUT"
- label: "Step 3d: TH reads CurrentHue attribute from DUT" # Expects 205 (50 - 100*(20/20) = -50 mod 255) with a tolerance of +/- 15 (15% of 100), so the expected value is in the range (190, 220)
PICS: CC.S.F00 && CC.S.A0000
command: "readAttribute"
attribute: "CurrentHue"
response:
constraints:
minValue: 208
maxValue: 255
minValue: 190
maxValue: 220

- label: "Wait 5s"
PICS: CC.S.F00
Expand All @@ -264,8 +241,8 @@ tests:
attribute: "CurrentHue"
response:
constraints:
minValue: 208
maxValue: 255
minValue: 190
maxValue: 220

- label: "Step 4a: TH reads ColorMode attribute from DUT"
PICS: CC.S.F00 && CC.S.A0008
Expand Down
2 changes: 1 addition & 1 deletion src/app/tests/suites/certification/ci-pics-values
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ CC.S.C41.Rsp=1
CC.S.C42.Rsp=1
CC.S.C43.Rsp=1
CC.S.C44.Rsp=1
CC.S.F00=0
CC.S.F00=1
CC.S.F01=1
CC.S.F02=1
CC.S.F03=1
Expand Down
Loading