Skip to content

Commit

Permalink
Update the yaml parser to be stricter regarding response configuration (
Browse files Browse the repository at this point in the history
#8751)

* Tests - Update the yaml parser to be stricter regarding response configuration

* Update generated tests
  • Loading branch information
vivien-apple authored and pull[bot] committed Sep 13, 2021
1 parent 2c48fbc commit ba56683
Show file tree
Hide file tree
Showing 8 changed files with 1,166 additions and 4,084 deletions.
4,178 changes: 880 additions & 3,298 deletions examples/chip-tool/commands/tests/Commands.h

Large diffs are not rendered by default.

21 changes: 12 additions & 9 deletions src/app/tests/suites/TV_ApplicationBasicCluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,39 +26,42 @@ tests:
- name: "status"
value: 1

# TODO: Support chars validation
- label: "Read attribute vendor name"
disabled: true
command: "readAttribute"
attribute: "vendor name"
response:
value: "exampleVendorName1"

# TODO: Support chars validation
# response:
# value: "exampleVendorName1"
- label: "Read attribute vendor id"
command: "readAttribute"
attribute: "vendor id"
response:
value: 1

# TODO: Support chars validation
- label: "Read attribute name"
disabled: true
command: "readAttribute"
attribute: "application name"
response:
value: "exampleName1"

# TODO: Support chars validation
# response:
# value: "exampleName1"
- label: "Read attribute product id"
command: "readAttribute"
attribute: "product id"
response:
value: 1

# TODO: Support chars validation
- label: "Read attribute id"
disabled: true
command: "readAttribute"
attribute: "application id"
response:
value: "appId"

# TODO: Support chars validation
# response:
# value: "appId"
- label: "Read attribute catalog vendor id"
command: "readAttribute"
attribute: "catalog vendor id"
Expand Down
70 changes: 54 additions & 16 deletions src/app/tests/suites/certification/Test_TC_CC_3_4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ tests:
- label:
"Check current hue attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current hue"
# response:
# value: 150
response:
value: 150

- label: "Move to hue longest distance command"
command: "MoveToHue"
Expand All @@ -72,10 +73,11 @@ tests:
- label:
"Check current hue attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current hue"
# response:
# value: 150
response:
value: 150

- label: "Move to hue up command"
command: "MoveToHue"
Expand All @@ -95,10 +97,11 @@ tests:
- label:
"Check current hue attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current hue"
# response:
# value: 250
response:
value: 250

- label: "Move to hue down command"
command: "MoveToHue"
Expand All @@ -118,10 +121,11 @@ tests:
- label:
"Check current hue attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current hue"
# response:
# value: 225
response:
value: 225

- label: "Move hue up command"
command: "MoveHue"
Expand All @@ -139,8 +143,11 @@ tests:
- label:
"Check current hue attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current hue"
response:
value: -1

- label: "Move hue stop command"
command: "MoveHue"
Expand All @@ -158,8 +165,11 @@ tests:
- label:
"Check current hue attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current hue"
response:
value: -1

- label: "Move hue down command"
command: "MoveHue"
Expand All @@ -177,8 +187,11 @@ tests:
- label:
"Check current hue attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current hue"
response:
value: -1

- label: "Move hue stop command"
command: "MoveHue"
Expand All @@ -196,8 +209,11 @@ tests:
- label:
"Check current hue attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current hue"
response:
value: -1

- label: "Step hue up command"
command: "StepHue"
Expand All @@ -217,8 +233,11 @@ tests:
- label:
"Check current hue attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current hue"
response:
value: -1

- label: "Step hue down command"
command: "StepHue"
Expand All @@ -238,14 +257,18 @@ tests:
- label:
"Check current hue attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current hue"
response:
value: -1

- label: "Check Saturation attribute value matched before any change"
disabled: true
command: "readAttribute"
attribute: "current saturation"
# response:
# value: 90
response:
value: 90

- label: "Move to saturation command"
command: "MoveToSaturation"
Expand All @@ -263,10 +286,11 @@ tests:
- label:
"Check Saturation attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current saturation"
# response:
# value: 90
response:
value: 90

- label: "Move saturation up command"
command: "MoveSaturation"
Expand All @@ -284,8 +308,11 @@ tests:
- label:
"Check Saturation attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current saturation"
response:
value: -1

- label: "Move saturation down command"
command: "MoveSaturation"
Expand All @@ -303,8 +330,11 @@ tests:
- label:
"Check Saturation attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current saturation"
response:
value: -1

- label: "Step saturation up command"
command: "StepSaturation"
Expand All @@ -324,8 +354,11 @@ tests:
- label:
"Check Saturation attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current saturation"
response:
value: -1

- label: "Step saturation down command"
command: "StepSaturation"
Expand All @@ -345,8 +378,11 @@ tests:
- label:
"Check Saturation attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current saturation"
response:
value: -1

- label: "Move To current hue and saturation command"
command: "MoveToHueAndSaturation"
Expand All @@ -365,18 +401,20 @@ tests:
- label:
"Check current hue attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current hue"
# response:
# value: 40
response:
value: 40

- label:
"Check Saturation attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current saturation"
# response:
# value: 160
response:
value: 160

- label: "Turn off light that we turned on"
cluster: "On/Off"
Expand Down
29 changes: 25 additions & 4 deletions src/app/tests/suites/certification/Test_TC_CC_5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,20 @@ tests:
- label:
"Check current y attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current x"
# response:
# value: 200
response:
value: 200

- label:
"Check current x attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current y"
# response:
# value: 300
response:
value: 300

- label: "Move Color command"
command: "MoveColor"
Expand All @@ -76,14 +79,20 @@ tests:
- label:
"Check current x attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current x"
response:
value: -1

- label:
"Check current y attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current y"
response:
value: -1

- label: "Stop Move Step command"
command: "StopMoveStep"
Expand All @@ -97,14 +106,20 @@ tests:
- label:
"Check current x attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current x"
response:
value: -1

- label:
"Check current y attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current y"
response:
value: -1

- label: "Step Color command"
command: "StepColor"
Expand All @@ -124,14 +139,20 @@ tests:
- label:
"Check current x attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current x"
response:
value: -1

- label:
"Check current y attribute value matched the value sent by the last
command"
disabled: true
command: "readAttribute"
attribute: "current y"
response:
value: -1

- label: "Turn off light that we turned on"
cluster: "On/Off"
Expand Down
Loading

0 comments on commit ba56683

Please sign in to comment.