Skip to content

Commit

Permalink
Adding 3 new Yamls and also splitting existing Color Cluster Yaml to …
Browse files Browse the repository at this point in the history
…match the cert test cases (#10050)

* Add new Yamls and splitting the CC Yamls to seperate ones to match the cert tests

* Update generated tests

* Restyled by whitespace

* Restyled by prettier-yaml

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Nov 30, 2021
1 parent cfd88c3 commit 1069192
Show file tree
Hide file tree
Showing 26 changed files with 10,662 additions and 4,349 deletions.
2 changes: 1 addition & 1 deletion examples/chip-tool/templates/tests-commands.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

#include <commands/tests/TestCommand.h>

{{>test_cluster tests="TV_TargetNavigatorCluster, TV_AudioOutputCluster, TV_ApplicationLauncherCluster, TV_KeypadInputCluster, TV_AccountLoginCluster, TV_WakeOnLanCluster, TV_ApplicationBasicCluster, TV_MediaPlaybackCluster, TV_TvChannelCluster, TV_LowPowerCluster, TV_MediaInputCluster, TestCluster, TestConstraints, TestDelayCommands, TestSubscribe_OnOff, Test_TC_OO_1_1, Test_TC_OO_2_1, Test_TC_OO_2_2, Test_TC_DM_1_1, Test_TC_DM_3_1, Test_TC_CC_3_4, Test_TC_CC_5, Test_TC_CC_6, Test_TC_CC_7, Test_TC_CC_8, Test_TC_WNCV_1_1, Test_TC_WNCV_2_1, Test_TC_WNCV_3_1, Test_TC_WNCV_3_2, Test_TC_WNCV_3_3, Test_TC_BI_1_1, Test_TC_FLW_1_1, Test_TC_TM_1_1, Test_TC_OCC_1_1, TestOperationalCredentialsCluster, Test_TC_LVL_1_1, Test_TC_CC_1_1, Test_TC_RH_1_1, Test_TC_MC_1_1, Test_TC_TSTAT_1_1, Test_TC_PCC_1_1, Test_TC_TSUIC_1_1, Test_TC_DIAGTH_1_1"}}
{{>test_cluster tests="TV_TargetNavigatorCluster, TV_AudioOutputCluster, TV_ApplicationLauncherCluster, TV_KeypadInputCluster, TV_AccountLoginCluster, TV_WakeOnLanCluster, TV_ApplicationBasicCluster, TV_MediaPlaybackCluster, TV_TvChannelCluster, TV_LowPowerCluster, TV_MediaInputCluster, TestCluster, TestConstraints, TestDelayCommands, TestSubscribe_OnOff, Test_TC_OO_1_1, Test_TC_OO_2_1, Test_TC_OO_2_2, Test_TC_DM_1_1, Test_TC_DM_3_1, Test_TC_WNCV_1_1, Test_TC_WNCV_2_1, Test_TC_WNCV_3_1, Test_TC_WNCV_3_2, Test_TC_WNCV_3_3, Test_TC_BI_1_1, Test_TC_FLW_1_1, Test_TC_TM_1_1, Test_TC_OCC_1_1, TestOperationalCredentialsCluster, Test_TC_LVL_1_1, Test_TC_CC_1_1, Test_TC_RH_1_1, Test_TC_MC_1_1, Test_TC_TSTAT_1_1, Test_TC_PCC_1_1, Test_TC_TSUIC_1_1, Test_TC_DIAGTH_1_1, Test_TC_TM_2_1, Test_TC_TSUIC_2_1, Test_TC_PCC_2_1, Test_TC_CC_3_1, Test_TC_CC_3_2, Test_TC_CC_3_3, Test_TC_CC_4_1, Test_TC_CC_4_2, Test_TC_CC_4_3, Test_TC_CC_4_4, Test_TC_CC_5_1, Test_TC_CC_5_2, Test_TC_CC_5_3, Test_TC_CC_6_1, Test_TC_CC_6_2, Test_TC_CC_6_3, Test_TC_CC_7_1, Test_TC_CC_7_2, Test_TC_CC_7_3, Test_TC_CC_7_4, Test_TC_CC_8_1"}}
138 changes: 138 additions & 0 deletions src/app/tests/suites/certification/Test_TC_CC_3_1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: 27.2.2. [TC-CC-3.1] Hue MoveTo functionality with server as DUT

config:
cluster: "Color Control"
endpoint: 1

tests:
- label: "Turn on light for color control tests"
cluster: "On/Off"
command: "on"

- label: "Check on/off attribute value is true after on command"
cluster: "On/Off"
command: "readAttribute"
attribute: "OnOff"
response:
value: 1

- label: "Move to hue shortest distance command"
command: "MoveToHue"
arguments:
values:
- name: "hue"
value: 150
- name: "direction"
value: 0
- name: "transitionTime"
value: 100
- name: "optionsMask"
value: 0
- name: "optionsOverride"
value: 0

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

- label: "Move to hue longest distance command"
command: "MoveToHue"
arguments:
values:
- name: "hue"
value: 200
- name: "direction"
value: 1
- name: "transitionTime"
value: 100
- name: "optionsMask"
value: 0
- name: "optionsOverride"
value: 0

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

- label: "Move to hue up command"
command: "MoveToHue"
arguments:
values:
- name: "hue"
value: 250
- name: "direction"
value: 2
- name: "transitionTime"
value: 100
- name: "optionsMask"
value: 0
- name: "optionsOverride"
value: 0

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

- label: "Move to hue down command"
command: "MoveToHue"
arguments:
values:
- name: "hue"
value: 225
- name: "direction"
value: 3
- name: "transitionTime"
value: 100
- name: "optionsMask"
value: 0
- name: "optionsOverride"
value: 0

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

- label: "Turn off light that we turned on"
cluster: "On/Off"
command: "off"

- label: "Check on/off attribute value is false after off command"
cluster: "On/Off"
command: "readAttribute"
attribute: "OnOff"
response:
value: 0
139 changes: 139 additions & 0 deletions src/app/tests/suites/certification/Test_TC_CC_3_2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: 27.2.3. [TC-CC-3.2] Hue Move functionality with server as DUT

config:
cluster: "Color Control"
endpoint: 1

tests:
- label: "Turn on light for color control tests"
cluster: "On/Off"
command: "on"

- label: "Check on/off attribute value is true after on command"
cluster: "On/Off"
command: "readAttribute"
attribute: "OnOff"
response:
value: 1

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

- label: "Move hue up command"
command: "MoveHue"
arguments:
values:
- name: "moveMode"
value: 1
- name: "rate"
value: 50
- name: "optionsMask"
value: 0
- name: "optionsOverride"
value: 0

- 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"
arguments:
values:
- name: "moveMode"
value: 0
- name: "rate"
value: 50
- name: "optionsMask"
value: 0
- name: "optionsOverride"
value: 0

- 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"
arguments:
values:
- name: "moveMode"
value: 3
- name: "rate"
value: 50
- name: "optionsMask"
value: 0
- name: "optionsOverride"
value: 0

- 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"
arguments:
values:
- name: "moveMode"
value: 0
- name: "rate"
value: 50
- name: "optionsMask"
value: 0
- name: "optionsOverride"
value: 0

- 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: "Turn off light that we turned on"
cluster: "On/Off"
command: "off"

- label: "Check on/off attribute value is false after off command"
cluster: "On/Off"
command: "readAttribute"
attribute: "OnOff"
response:
value: 0
99 changes: 99 additions & 0 deletions src/app/tests/suites/certification/Test_TC_CC_3_3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: 27.2.4. [TC-CC-3.3] Hue Step functionality with server as DUT

config:
cluster: "Color Control"
endpoint: 1

tests:
- label: "Turn on light for color control tests"
cluster: "On/Off"
command: "on"

- label: "Check on/off attribute value is true after on command"
cluster: "On/Off"
command: "readAttribute"
attribute: "OnOff"
response:
value: 1

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

- label: "Step hue up command"
command: "StepHue"
arguments:
values:
- name: "stepMode"
value: 1
- name: "stepSize"
value: 5
- name: "transitionTime"
value: 25
- name: "optionsMask"
value: 0
- name: "optionsOverride"
value: 0

- 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"
arguments:
values:
- name: "stepMode"
value: 3
- name: "stepSize"
value: 5
- name: "transitionTime"
value: 25
- name: "optionsMask"
value: 0
- name: "optionsOverride"
value: 0

- 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: "Turn off light that we turned on"
cluster: "On/Off"
command: "off"

- label: "Check on/off attribute value is false after off command"
cluster: "On/Off"
command: "readAttribute"
attribute: "OnOff"
response:
value: 0
Loading

0 comments on commit 1069192

Please sign in to comment.