Skip to content

Commit

Permalink
Add cert tests mc (#10873)
Browse files Browse the repository at this point in the history
* Add new Media Cluster test cases

* New Media Cluster Cert test cases.

* Auto gen tests.

* Restyled by whitespace

* Restyled by prettier-yaml

* Add tests to Darwin.

Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Justin Wood <[email protected]>
  • Loading branch information
3 people authored and pull[bot] committed Jan 27, 2022
1 parent 581c1da commit 1686932
Show file tree
Hide file tree
Showing 9 changed files with 602 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 @@ -67,6 +67,12 @@ function getTests()

const MediaControl = [
'Test_TC_MC_1_1',
'Test_TC_MC_3_6',
'Test_TC_MC_3_7',
'Test_TC_MC_3_8',
'Test_TC_MC_3_9',
'Test_TC_MC_3_10',
'Test_TC_MC_3_11',
];

const OnOff = [
Expand Down
29 changes: 29 additions & 0 deletions src/app/tests/suites/certification/Test_TC_MC_3_10.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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.5.3. [TC-MC-3.10] Show and Hide Input Status Verification

config:
cluster: "Media Input"
endpoint: 1

tests:
# TDOD: Enable when SDK supports command
- label: "Hide Input Status Command"
disabled: true
command: "HideInputStatus"
# TDOD: Enable when SDK supports command
- label: "Show Input Status Command"
disabled: true
command: "ShowInputStatus"
48 changes: 48 additions & 0 deletions src/app/tests/suites/certification/Test_TC_MC_3_11.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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.5.4. [TC-MC-3.11] Rename Input Verification

config:
cluster: "Media Input"
endpoint: 1

tests:
# Remove disable flag when SDK supports command.
- label: "Rename Input Command"
disabled: true
command: "RenameInput"
arguments:
values:
- name: "index"
value: 1
- name: "name"
value: "A1"
# Remove disable flag when SDK supports command.
- label: "Rename Input Command"
disabled: true
command: "RenameInput"
arguments:
values:
- name: "index"
value: 1
- name: "name"
value: "A2"
# Remove disable flag when SDK supports command.
- label: "Read attribute media input list"
disabled: true
command: "readAttribute"
attribute: "media input list"
response:
value: []
70 changes: 70 additions & 0 deletions src/app/tests/suites/certification/Test_TC_MC_3_6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# 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.4.2. [TC-MC-3.6] Current App Verification

config:
cluster: "Application Launcher"
endpoint: 1

tests:
# TODO: Update the corresponding values when feature is supported
- label: "Launch an app with the provided a application ID"
disabled: true
command: "LaunchApp"
arguments:
values:
- name: "data"
value: "Hello World"
- name: "catalogVendorId"
value: 1234
- name: "applicationId"
value: "HelloWorldApp"

# TODO: Update response value to correspond with catalog vendor ID
- label: "Read Current catalog vendor id attribute."
disabled: true
command: "readAttribute"
attribute: "catalog vendor id"
response:
value: 1234
constraints:
type: uint16

# TODO: Update response value to correspond with application ID
- label: "Read Current App ID attribute."
disabled: true
command: "readAttribute"
attribute: "application id"
response:
value: "HelloWorldApp"
constraints:
type: string

# TODO: Update the corresponding values when feature is supported
- label: "Stop an app with the provided application ID"
disabled: true
command: "StopApp"
arguments:
values:
- name: "applicationId"
value: "HelloWorldApp"

# TODO: Update response value to correspond with application ID
- label: "Read Current App ID attribute."
disabled: true
command: "readAttribute"
attribute: "application id"
response:
value: null
85 changes: 85 additions & 0 deletions src/app/tests/suites/certification/Test_TC_MC_3_7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# 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.4.2. [TC-MC-3.6] Current App Verification

config:
cluster: "Application Launcher"
endpoint: 1

tests:
# TODO: Update the corresponding values when feature is supported
- label: "Launch an app with the provided a application ID"
disabled: true
command: "LaunchApp"
arguments:
values:
- name: "data"
value: "Hello World"
- name: "catalogVendorId"
value: 1234
- name: "applicationId"
value: "HelloWorldApp"

# TODO: Update the corresponding values when feature is supported
- label: "Stop an app with the provided application ID"
disabled: true
command: "StopApp"
arguments:
values:
- name: "applicationId"
value: "HelloWorldApp"

# TODO: Update the corresponding values when feature is supported
- label: "Launch an app with the provided a application ID"
disabled: true
command: "LaunchApp"
arguments:
values:
- name: "data"
value: "Hello World"
- name: "catalogVendorId"
value: 1234
- name: "applicationId"
value: "NonAvailableApp"
response:
error: 1

# TODO: Update the corresponding values when feature is supported
- label: "Launch an app with the provided a application ID"
disabled: true
command: "LaunchApp"
arguments:
values:
- name: "data"
value: "Hello World"
- name: "catalogVendorId"
value: 1234
- name: "applicationId"
value: "HelloWorldApp"

# TODO: Update the corresponding values when feature is supported
- label: "Launch an app with the provided a application ID"
disabled: true
command: "LaunchApp"
arguments:
values:
- name: "data"
value: "Hello World"
- name: "catalogVendorId"
value: 1234
- name: "applicationId"
value: "HelloWorldApp2"
response:
error: 2
28 changes: 28 additions & 0 deletions src/app/tests/suites/certification/Test_TC_MC_3_8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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.5.1. [TC-MC-3.8] Input List Verification

config:
cluster: "Media Input"
endpoint: 1

tests:
# TODO: Enable test and update response value when SDK supports.
- label: "Read attribute media input list"
disabled: true
command: "readAttribute"
attribute: "media input list"
response:
value: []
36 changes: 36 additions & 0 deletions src/app/tests/suites/certification/Test_TC_MC_3_9.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.5.2. [TC-MC-3.9] Select Input Verification

config:
cluster: "Media Input"
endpoint: 1

tests:
# Remove disable flag when SDK supports command.
- label: "Select Input Command"
disabled: true
command: "SelectInput"
arguments:
values:
- name: "index"
value: 1
# Remove disable flag when SDK supports attribute.
- label: "Read current input list"
disabled: true
command: "readAttribute"
attribute: "current media input"
response:
value: 1
6 changes: 6 additions & 0 deletions src/darwin/Framework/CHIP/templates/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ function getTests()

const MediaControl = [
'Test_TC_MC_1_1',
'Test_TC_MC_3_6',
'Test_TC_MC_3_7',
'Test_TC_MC_3_8',
'Test_TC_MC_3_9',
'Test_TC_MC_3_10',
'Test_TC_MC_3_11',
];

const OnOff = [
Expand Down
Loading

0 comments on commit 1686932

Please sign in to comment.