Skip to content

Commit

Permalink
Test Scripts Added Test_TC_OCC_2_1, Test_TC_PCC_2_2, Test_TC_PCC_2_3,…
Browse files Browse the repository at this point in the history
… Test_TC_RH_2_1 (#10955)

* Adding YAML Test Scripts
1.Test_TC_OCC_2_1
2.Test_TC_PCC_2_2
3.Test_TC_PCC_2_3
4.Test_TC_RH_2_1

* Updating generated test script artifacts

* Update PCC attributes names since 10962 has landed

Co-authored-by: Vivien Nicolas <vnicolas@apple.com>
  • Loading branch information
2 people authored and pull[bot] committed Apr 4, 2022
1 parent ba2021a commit 4772410
Show file tree
Hide file tree
Showing 8 changed files with 1,473 additions and 8 deletions.
4 changes: 4 additions & 0 deletions examples/chip-tool/templates/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ function getTests()

const OccupancySensing = [
'Test_TC_OCC_1_1',
'Test_TC_OCC_2_1',
];

const LevelControl = [
Expand Down Expand Up @@ -84,10 +85,13 @@ function getTests()
const PumpConfigurationControl = [
'Test_TC_PCC_1_1',
'Test_TC_PCC_2_1',
'Test_TC_PCC_2_2',
'Test_TC_PCC_2_3',
];

const RelativeHumidityMeasurement = [
'Test_TC_RH_1_1',
'Test_TC_RH_2_1',
];

const TemperatureMeasurement = [
Expand Down
115 changes: 115 additions & 0 deletions src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# 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: 30.2.1. [TC-OCC-2.1] Attributes with server as DUT

config:
cluster: "Occupancy Sensing"
endpoint: 1

tests:
- label: "Reads mandatory attribute: Occupancy"
disabled: true
command: "readAttribute"
attribute: "occupancy"
response:
value: 0

- label: "Reads mandatory attribute constrains: Occupancy"
command: "readAttribute"
attribute: "occupancy"
response:
constraints:
type: map8
minValue: 0
maxValue: 1

- label:
"Writes the respective default value to mandatory attribute: Occupancy"
command: "writeAttribute"
attribute: "occupancy"
arguments:
value: 0
response:
error: 1

- label: "Reads back mandatory attribute: Occupancy"
command: "readAttribute"
attribute: "occupancy"
response:
value: 0

- label: "Reads mandatory attribute: OccupancySensorType"
disabled: true
command: "readAttribute"
attribute: "occupancy sensor type"
response:
value: 0

- label: "Reads mandatory attribute constrains: OccupancySensorType"
command: "readAttribute"
attribute: "occupancy sensor type"
response:
constraints:
type: enum8
minValue: 0
maxValue: 3

- label:
"Writes the respective default value to mandatory attribute:
OccupancySensorType"
command: "writeAttribute"
attribute: "occupancy sensor type"
arguments:
value: 0
response:
error: 1

- label: "Reads back mandatory attribute: OccupancySensorType"
command: "readAttribute"
attribute: "occupancy sensor type"
response:
value: 0

- label: "Reads mandatory attribute: OccupancySensorTypeBitmap"
disabled: true
command: "readAttribute"
attribute: "occupancy sensor type bitmap"
response:
value: 0

- label: "Reads mandatory attribute constrains: OccupancySensorTypeBitmap"
command: "readAttribute"
attribute: "occupancy sensor type bitmap"
response:
constraints:
type: map8
minValue: 1
maxValue: 7

- label:
"Writes the respective default value to mandatory attribute:
OccupancySensorTypeBitmap"
command: "writeAttribute"
attribute: "occupancy sensor type bitmap"
arguments:
value: 1
response:
error: 1

- label: "Reads back mandatory attribute: OccupancySensorTypeBitmap"
command: "readAttribute"
attribute: "occupancy sensor type bitmap"
response:
value: 1
59 changes: 59 additions & 0 deletions src/app/tests/suites/certification/Test_TC_PCC_2_2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# 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: 15.2.2. [TC-PCC-2.2] Primary functionality with server as DUT

config:
cluster: "Pump Configuration and Control"
endpoint: 1

tests:
- label: "Write 1 to the OperationMode attribute to DUT: OperationMode"
command: "writeAttribute"
attribute: "OperationMode"
arguments:
value: 1

- label: "Reads the attribute: EffectiveOperationMode"
disabled: true
command: "readAttribute"
attribute: "EffectiveOperationMode"
response:
value: 1

- label: "Write 2 to the OperationMode attribute to DUT: OperationMode"
command: "writeAttribute"
attribute: "OperationMode"
arguments:
value: 2

- label: "Reads the attribute: EffectiveOperationMode"
disabled: true
command: "readAttribute"
attribute: "EffectiveOperationMode"
response:
value: 2

- label: "Write 3 to the OperationMode attribute to DUT: OperationMode"
command: "writeAttribute"
attribute: "OperationMode"
arguments:
value: 3

- label: "Reads the attribute: EffectiveOperationMode"
disabled: true
command: "readAttribute"
attribute: "EffectiveOperationMode"
response:
value: 3
116 changes: 116 additions & 0 deletions src/app/tests/suites/certification/Test_TC_PCC_2_3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# 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: 15.2.3. [TC-PCC-2.3] Primary functionality with server as DUT

config:
cluster: "Pump Configuration and Control"
endpoint: 1

tests:
- label: "Write 0 to the OperationMode attribute to DUT"
command: "writeAttribute"
attribute: "OperationMode"
arguments:
value: 0

- label: "Reads the attribute: EffectiveOperationMode"
command: "readAttribute"
attribute: "EffectiveOperationMode"
response:
value: 0

- label: "Write 0 to the ControlMode attribute to DUT"
disabled: true
command: "writeAttribute"
attribute: "ControlMode"
arguments:
value: 0

- label: "Reads the attribute: EffectiveControlMode"
disabled: true
command: "readAttribute"
attribute: "EffectiveControlMode"
response:
value: 0

- label: "Write 1 to the ControlMode attribute to DUT"
disabled: true
command: "writeAttribute"
attribute: "ControlMode"
arguments:
value: 1

- label: "Reads the attribute: EffectiveControlMode"
disabled: true
command: "readAttribute"
attribute: "EffectiveControlMode"
response:
value: 1

- label: "Write 2 to the ControlMode attribute to DUT"
disabled: true
command: "writeAttribute"
attribute: "ControlMode"
arguments:
value: 2

- label: "Reads the attribute: EffectiveControlMode"
disabled: true
command: "readAttribute"
attribute: "EffectiveControlMode"
response:
value: 2

- label: "Write 3 to the ControlMode attribute to DUT"
disabled: true
command: "writeAttribute"
attribute: "ControlMode"
arguments:
value: 3

- label: "Reads the attribute: EffectiveControlMode"
disabled: true
command: "readAttribute"
attribute: "EffectiveControlMode"
response:
value: 3

- label: "Write 5 to the ControlMode attribute to DUT"
disabled: true
command: "writeAttribute"
attribute: "ControlMode"
arguments:
value: 5

- label: "Reads the attribute: EffectiveControlMode"
disabled: true
command: "readAttribute"
attribute: "EffectiveControlMode"
response:
value: 5

- label: "Write 7 to the ControlMode attribute to DUT"
disabled: true
command: "writeAttribute"
attribute: "ControlMode"
arguments:
value: 7

- label: "Reads the attribute: EffectiveControlMode"
disabled: true
command: "readAttribute"
attribute: "EffectiveControlMode"
response:
value: 7
84 changes: 84 additions & 0 deletions src/app/tests/suites/certification/Test_TC_RH_2_1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# 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: 9.2.1. [TC-RH-2.1] Attributes with server as DUT

config:
cluster: "Relative Humidity Measurement"
endpoint: 1

tests:
- label: "Reads the mandatory attribute: MeasuredValue"
disabled: true
command: "readAttribute"
attribute: "measured value"
response:
value: 65535

- label: "Reads constraints of attribute: MeasuredValue"
command: "readAttribute"
attribute: "measured value"
response:
constraints:
type: uint16

- label: "Reads the mandatory attribute: MinMeasuredValue"
disabled: true
command: "readAttribute"
attribute: "min measured value"
response:
value: 65535

- label: "Reads constraints of attribute: MinMeasuredValue"
command: "readAttribute"
attribute: "min measured value"
response:
constraints:
type: uint16
minValue: 0
maxValue: 9999

- label: "Reads the mandatory attribute: MaxMeasuredValue"
disabled: true
command: "readAttribute"
attribute: "max measured value"
response:
value: 65535

- label: "Reads constraints of attribute: MaxMeasuredValue"
disabled: true
command: "readAttribute"
attribute: "max measured value"
response:
constraints:
type: uint16
minValue: 1
maxValue: 10000

- label: "Reads the optional attribute: Tolerance"
disabled: true
command: "readAttribute"
attribute: "tolerance"
response:
value: 0

- label: "Reads constraints of attribute: Tolerance"
disabled: true
command: "readAttribute"
attribute: "tolerance"
response:
constraints:
type: uint16
minValue: 0
maxValue: 2048
Loading

0 comments on commit 4772410

Please sign in to comment.