Skip to content

Commit

Permalink
New YAML cert test cases (#10534)
Browse files Browse the repository at this point in the history
* Add YAML files and update zap files.

* Generated code.

* Restyled by whitespace

* Revert helper in chip tool.

* Add tests to Darwin

* Regenerating ZAP

* Rebase master.

* Generated code.

Co-authored-by: Restyled.io <commits@restyled.io>
Co-authored-by: Justin Wood <woody@apple.com>
  • Loading branch information
3 people authored and pull[bot] committed Mar 24, 2022
1 parent bed8054 commit 1354320
Show file tree
Hide file tree
Showing 10 changed files with 775 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/chip-tool/templates/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ function getTests()

const MediaControl = [
'Test_TC_MC_1_1',
'Test_TC_MC_2_1',
'Test_TC_MC_3_1',
'Test_TC_MC_3_2',
'Test_TC_MC_3_3',
'Test_TC_MC_3_4',
'Test_TC_MC_3_5',
'Test_TC_MC_3_6',
'Test_TC_MC_3_7',
'Test_TC_MC_3_8',
Expand Down
23 changes: 23 additions & 0 deletions src/app/tests/suites/certification/Test_TC_MC_2_1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 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: 21.2.1. [TC-MC-2.1] Low Power Mode Verification (DUT as Server)

config:
cluster: "Low Power"
endpoint: 1

tests:
- label: "Put the device into low power mode"
command: "Sleep"
142 changes: 142 additions & 0 deletions src/app/tests/suites/certification/Test_TC_MC_3_1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# 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: 21.3.1. [TC-MC-3.1] Navigation Keycode Verification

config:
cluster: "Keypad Input"
endpoint: 1

tests:
- label: "Send Select"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x00

- label: "Send Up"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x01

- label: "Send Down"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x02

- label: "Send Left"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x03
- label: "Send Right"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x04

- label: "Send RightUp"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x05

- label: "Send RightDown"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x06

- label: "Send LeftUp"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x07

- label: "Send LeftDown"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x08

- label: "Send RootMenu"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x09

- label: "Send SetupMenu"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x0A

- label: "Send ContentsMenu"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x0B

- label: "Send FavoriteMenu"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x0C

- label: "Send Exit"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x0D

- label: "Send Invalid"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0xFF
response:
error: 1
# TODO: Add Step 10 (TH sends <Any Navigation> Keycode to DUT, when DUT in a processing state)
36 changes: 36 additions & 0 deletions src/app/tests/suites/certification/Test_TC_MC_3_2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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: 21.3.2. [TC-MC-3.2] Location Keys Verification

config:
cluster: "Keypad Input"
endpoint: 1

tests:
- label: "Send RootMenu"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x09

- label: "Send SetupMenu"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x0A
92 changes: 92 additions & 0 deletions src/app/tests/suites/certification/Test_TC_MC_3_3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# 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: 21.3.3. [TC-MC-3.3] Number Keys Verification

config:
cluster: "Keypad Input"
endpoint: 1

tests:
- label: "Send Numbers1"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x21

- label: "Send Numbers2"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x22

- label: "Send Numbers3"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x23

- label: "Send Numbers4"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x24

- label: "Send Numbers5"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x25

- label: "Send Numbers6"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x26

- label: "Send Numbers7"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x27

- label: "Send Numbers8"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x28

- label: "Send Numbers9"
disabled: true
command: "SendKey"
arguments:
values:
- name: "keyCode"
value: 0x29
Loading

0 comments on commit 1354320

Please sign in to comment.