Skip to content

Commit

Permalink
WindowCovering: YAML Add GoTos tests (#15193)
Browse files Browse the repository at this point in the history
* Test: Start adding tests backport

* TEST: Yaml add WNCV 3.4 3.5 4.3 4.4

* DEV: Remove 2.3 need another PR for it

* DEV: Add wait for commissionee

* DEV: Remove Darwin tests 3.5 3.4 due to compile issues

- Add comment about todos + issues

* DEV: Zap all-cluster-app activate missing functions for CI

* Restyled by whitespace

* Restyled by prettier-yaml

* DEV: Activate 3.4 3.5 on Darwin

- Issue #15192 is resolved

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Dec 4, 2023
1 parent adf3a4c commit 5580798
Show file tree
Hide file tree
Showing 15 changed files with 2,962 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3512,7 +3512,29 @@ server cluster WindowCovering = 258 {
readonly global attribute bitmap32 featureMap = 65532;
readonly global attribute int16u clusterRevision = 65533;

request struct GoToLiftPercentageRequest {
Percent liftPercentageValue = 0;
Percent100ths liftPercent100thsValue = 1;
}

request struct GoToLiftValueRequest {
INT16U liftValue = 0;
}

request struct GoToTiltPercentageRequest {
Percent tiltPercentageValue = 0;
Percent100ths tiltPercent100thsValue = 1;
}

request struct GoToTiltValueRequest {
INT16U tiltValue = 0;
}

command DownOrClose(): DefaultSuccess = 1;
command GoToLiftPercentage(GoToLiftPercentageRequest): DefaultSuccess = 5;
command GoToLiftValue(GoToLiftValueRequest): DefaultSuccess = 4;
command GoToTiltPercentage(GoToTiltPercentageRequest): DefaultSuccess = 8;
command GoToTiltValue(GoToTiltValueRequest): DefaultSuccess = 7;
command StopMotion(): DefaultSuccess = 2;
command UpOrOpen(): DefaultSuccess = 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11587,31 +11587,31 @@
"code": 4,
"mfgCode": null,
"source": "client",
"incoming": 0,
"incoming": 1,
"outgoing": 0
},
{
"name": "GoToLiftPercentage",
"code": 5,
"mfgCode": null,
"source": "client",
"incoming": 0,
"incoming": 1,
"outgoing": 0
},
{
"name": "GoToTiltValue",
"code": 7,
"mfgCode": null,
"source": "client",
"incoming": 0,
"incoming": 1,
"outgoing": 0
},
{
"name": "GoToTiltPercentage",
"code": 8,
"mfgCode": null,
"source": "client",
"incoming": 0,
"incoming": 1,
"outgoing": 0
}
],
Expand Down
4 changes: 4 additions & 0 deletions examples/chip-tool/templates/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,10 @@ function getTests()
'Test_TC_WNCV_3_1',
'Test_TC_WNCV_3_2',
'Test_TC_WNCV_3_3',
'Test_TC_WNCV_3_4',
'Test_TC_WNCV_3_5',
'Test_TC_WNCV_4_3',
'Test_TC_WNCV_4_4',
];

const TV = [
Expand Down
9 changes: 9 additions & 0 deletions src/app/tests/suites/certification/PICS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,15 @@ PICS:
attribute?"
id: A_CURRENTPOSITIONTILTPERCENTAGE

## WC-Commands received
- label:
"Does the device implement receiving the GoToLiftPercentage command?"
id: PICS_CR_GOTOLIFTPERCENTAGE

- label:
"Does the device implement receiving the GoToTiltPercentage command?"
id: PICS_CR_GOTOTILTPERCENTAGE

# On/Off Cluster
- label: "Does the device implement the OnOff attribute?"
id: A_ONOFF
Expand Down
115 changes: 115 additions & 0 deletions src/app/tests/suites/certification/Test_TC_WNCV_3_4.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:
Window Covering [TC-WNCV-3.4] UpOrOpen Long-Run Verification with server as
DUT

config:
nodeId: 0x12344321
cluster: "Window Covering"
endpoint: 1
fastMotionDuration:
type: INT16U
defaultValue: 3000
fullMotionDuration:
type: INT16U
defaultValue: 6000

tests:
- label: "0: Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId

################ Position Init Phase #############
### Step 1x -> Initialize the Covering position before any testing
### MANDATORY Init Commands
- label:
"1a: TH sends DownOrClose command to preposition the DUT in the
opposite direction"
command: "DownOrClose"

### DUT adjusts to a non-open position
### Testers should input the fastMotionDuration parameter that match their DUT behavior
- label:
"1b: TH Waits for fastMotionDuration seconds movement(s) on the device"
cluster: "DelayCommands"
command: "WaitForMs"
arguments:
values:
- name: "ms"
value: fastMotionDuration

######## UpOrOpen Long-Run Command #######
### Step 2x -> Check UpOrOpen Long-Run effects
### MANDATORY Command
- label: "2a: TH sends UpOrOpen command to DUT"
command: "UpOrOpen"

### DUT move toward its fully-open position
### Testers should input the fullMotionDuration parameter that match their DUT behavior
- label:
"2b: TH Waits for fullMotionDuration seconds movement(s) on the device"
cluster: "DelayCommands"
command: "WaitForMs"
arguments:
values:
- name: "ms"
value: fullMotionDuration

######## UpOrOpen Long-Run: Category only for Position Aware DUT #######
### Step 3x -> Verify the DUT has reached its fully-open limits
### Mandatory Depends on the FeatureMap
- label:
"3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute
from DUT"
command: "readAttribute"
attribute: "CurrentPositionLiftPercent100ths"
PICS: WNCV_LF && WNCV_PA_LF
response:
value: 0

### Optional Depends on the FeatureMap
- label:
"3b: If (PA & LF) TH reads CurrentPositionLiftPercentage optional
attribute from DUT"
command: "readAttribute"
attribute: "CurrentPositionLiftPercentage"
PICS: WNCV_LF && WNCV_PA_LF && A_CURRENTPOSITIONLIFTPERCENTAGE
response:
value: 0

### Mandatory Depends on the FeatureMap
- label:
"3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute
from DUT"
command: "readAttribute"
attribute: "CurrentPositionTiltPercent100ths"
PICS: WNCV_TL && WNCV_PA_TL
response:
value: 0

### Optional Depends on the FeatureMap
- label:
"3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional
attribute from DUT"
command: "readAttribute"
attribute: "CurrentPositionTiltPercentage"
PICS: WNCV_TL && WNCV_PA_TL && A_CURRENTPOSITIONLIFTPERCENTAGE
response:
value: 0
115 changes: 115 additions & 0 deletions src/app/tests/suites/certification/Test_TC_WNCV_3_5.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:
Window Covering [TC-WNCV-3.5] DownOrClose Long-Run Verification with server
as DUT

config:
nodeId: 0x12344321
cluster: "Window Covering"
endpoint: 1
fastMotionDuration:
type: INT16U
defaultValue: 3000
fullMotionDuration:
type: INT16U
defaultValue: 6000

tests:
- label: "0: Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId

################ Position Init Phase #############
### Step 1x -> Initialize the Covering position before any testing
### MANDATORY Init Commands
- label:
"1a: TH sends UpOrOpen command to preposition the DUT in the opposite
direction"
command: "UpOrOpen"

### DUT adjusts to a non-closed position
### Testers should input the fastMotionDuration parameter that match their DUT behavior
- label:
"1b: TH Waits for fastMotionDuration seconds movement(s) on the device"
cluster: "DelayCommands"
command: "WaitForMs"
arguments:
values:
- name: "ms"
value: fastMotionDuration

######## DownOrClose Long-Run Command #######
### Step 2x -> Check DownOrClose Long-Run effects
### MANDATORY Command
- label: "2a: TH sends DownOrClose command to DUT"
command: "DownOrClose"

### DUT move toward its fully-closed position
### Testers should input the fullMotionDuration parameter that match their DUT behavior
- label:
"2b: TH Waits for fullMotionDuration seconds movement(s) on the device"
cluster: "DelayCommands"
command: "WaitForMs"
arguments:
values:
- name: "ms"
value: fullMotionDuration

######## DownOrClose Long-Run: Category only for Position Aware DUT #######
### Step 3x -> Verify the DUT has reached its fully-open limits
### Mandatory Depends on the FeatureMap
- label:
"3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute
from DUT"
command: "readAttribute"
attribute: "CurrentPositionLiftPercent100ths"
PICS: WNCV_LF && WNCV_PA_LF
response:
value: 10000

### Optional Depends on the FeatureMap
- label:
"3b: If (PA & LF) TH reads CurrentPositionLiftPercentage optional
attribute from DUT"
command: "readAttribute"
attribute: "CurrentPositionLiftPercentage"
PICS: WNCV_LF && WNCV_PA_LF && A_CURRENTPOSITIONLIFTPERCENTAGE
response:
value: 100

### Mandatory Depends on the FeatureMap
- label:
"3c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute
from DUT"
command: "readAttribute"
attribute: "CurrentPositionTiltPercent100ths"
PICS: WNCV_TL && WNCV_PA_TL
response:
value: 10000

### Optional Depends on the FeatureMap
- label:
"3d: If (PA & TL) TH reads CurrentPositionTiltPercentage optional
attribute from DUT"
command: "readAttribute"
attribute: "CurrentPositionTiltPercentage"
PICS: WNCV_TL && WNCV_PA_TL && A_CURRENTPOSITIONLIFTPERCENTAGE
response:
value: 100
Loading

0 comments on commit 5580798

Please sign in to comment.