-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add files via upload Add yaml test script for TBRM * Update TEST_TC_TBRM_2.2.yaml * Update TEST_TC_TBRM_2.3.yaml * Update TEST_TC_TBRM_2.4.yaml * Implement TBRM PanChange support in the network-manager-app example * Make the TC_TBRM tests work Test 2.4 has been merged into 2.2 as this makes it easier to test. Test 2.5 has been removed because SetPendingDataset does not require FailSafe. * Rename test files to match naming convention * Restyle * Start without an active dataset in TC_TBRM_2_3 This is so the test passes when running against the example app in CI. * Tweaks based on feedback from Stephane * Align with test plan --------- Co-authored-by: StephaneGUELEC <94045077+StephaneGUELEC@users.noreply.github.com>
- Loading branch information
1 parent
3cc44e6
commit 2b5194b
Showing
9 changed files
with
366 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
116 changes: 116 additions & 0 deletions
116
src/app/tests/suites/certification/Test_TC_TBRM_2_2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
# Copyright (c) 2024 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: "[TC-TBRM-2.2] Initial Dataset configuration of Thread Border Router" | ||
|
||
PICS: | ||
- TBRM.S | ||
|
||
config: | ||
nodeId: 0x12344321 | ||
cluster: Thread Border Router Management | ||
endpoint: 1 | ||
PIXIT.TBRM.THREAD_ACTIVE_DATASET: | ||
type: octet_string | ||
defaultValue: "hex:0e080000000000010000000300001235060004001fffe002082ad51c02fe8f64f20708fddb8af85255f93a051083e2b9b2cc609b00125adbf823ea2ab20102c4d904100a133626c411d7de02a570ca3c3d80470c0402a0f7f8031054687265616441637469766554657374" | ||
# Active Timestamp ----^^^^^^^^^^^^^^^^ | ||
PIXIT.TBRM.THREAD_ACTIVE_DATASET.ACTIVE_TIMESTAMP: 0x10000 | ||
PIXIT.TBRM.THREAD_INVALID_DATASET: | ||
type: octet_string | ||
defaultValue: "hex:00112233" | ||
|
||
# Precondition: | ||
# The DUT does not have an Active Dataset | ||
|
||
tests: | ||
- label: "Wait for the commissioned device to be retrieved" | ||
cluster: DelayCommands | ||
command: WaitForCommissionee | ||
arguments: | ||
values: | ||
- name: nodeId | ||
value: nodeId | ||
|
||
- label: "TH reads the ActiveDatasetTimestamp attribute from the DUT" | ||
command: readAttribute | ||
attribute: ActiveDatasetTimestamp | ||
response: | ||
value: null | ||
|
||
- label: "TH reads the PendingDatasetTimestamp attribute from the DUT" | ||
command: readAttribute | ||
attribute: PendingDatasetTimestamp | ||
response: | ||
value: null | ||
|
||
- label: | ||
"TH sends a valid ActiveDatasetRequest command to the DUT without | ||
having armed the fail-safe" | ||
command: SetActiveDatasetRequest | ||
arguments: | ||
values: | ||
- name: ActiveDataset | ||
value: PIXIT.TBRM.THREAD_ACTIVE_DATASET | ||
response: | ||
error: FAILSAFE_REQUIRED | ||
|
||
- label: "TH sends ArmFailSafe command to the DUT" | ||
cluster: General Commissioning | ||
command: ArmFailSafe | ||
endpoint: 0 | ||
arguments: | ||
values: | ||
- name: ExpiryLengthSeconds | ||
value: 60 | ||
- name: Breadcrumb | ||
value: 1 | ||
|
||
- label: "TH sends an invalid ActiveDatasetRequest command to the DUT" | ||
command: SetActiveDatasetRequest | ||
arguments: | ||
values: | ||
- name: ActiveDataset | ||
value: PIXIT.TBRM.THREAD_INVALID_DATASET | ||
response: | ||
error: INVALID_COMMAND | ||
|
||
- label: "TH sends a valid ActiveDatasetRequest command to the DUT" | ||
command: SetActiveDatasetRequest | ||
arguments: | ||
values: | ||
- name: ActiveDataset | ||
value: PIXIT.TBRM.THREAD_ACTIVE_DATASET | ||
|
||
- label: "TH reads the InterfaceEnabled attribute from the DUT" | ||
command: readAttribute | ||
attribute: InterfaceEnabled | ||
response: | ||
value: true | ||
|
||
- label: "TH reads the ActiveDatasetTimestamp attribute from the DUT" | ||
command: readAttribute | ||
attribute: ActiveDatasetTimestamp | ||
response: | ||
value: PIXIT.TBRM.THREAD_ACTIVE_DATASET.ACTIVE_TIMESTAMP | ||
constraints: | ||
type: int64u | ||
|
||
- label: "TH sends a valid GetActiveDatasetRequest command to the DUT" | ||
command: GetActiveDatasetRequest | ||
response: | ||
values: | ||
- name: Dataset | ||
value: PIXIT.TBRM.THREAD_ACTIVE_DATASET | ||
constraints: | ||
type: octet_string |
166 changes: 166 additions & 0 deletions
166
src/app/tests/suites/certification/Test_TC_TBRM_2_3.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
# Copyright (c) 2024 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: "[TC-TBRM-2.3] Change dataset configuration of Thread Border Router" | ||
|
||
PICS: | ||
- TBRM.S | ||
- TBRM.S.F00 | ||
|
||
config: | ||
nodeId: 0x12344321 | ||
cluster: Thread Border Router Management | ||
endpoint: 1 | ||
PIXIT.TBRM.THREAD_ACTIVE_DATASET: | ||
type: octet_string | ||
defaultValue: "hex:0e080000000000010000000300001235060004001fffe002082ad51c02fe8f64f20708fddb8af85255f93a051083e2b9b2cc609b00125adbf823ea2ab20102c4d904100a133626c411d7de02a570ca3c3d80470c0402a0f7f8031054687265616441637469766554657374" | ||
PIXIT.TBRM.THREAD_PENDING_DATASET: | ||
type: octet_string | ||
defaultValue: "hex:0e08000000000002000033080000000000010000340400004e2035060004001fffe002082ad51c02fe8f64f20708fddb8af85255f93a051083e2b9b2cc609b00125adbf823ea2ab20102c4d904100a133626c411d7de02a570ca3c3d80470c0402a0f7f8030d54687265616450656e64696e67000300000c" | ||
# Active Timestamp ----^^^^^^^^^^^^^^^^ | ||
# Pending Timestamp -----------------------^^^^^^^^^^^^^^^^ | ||
# Delay Timer -------------------------------------------------^^^^^^^^ == 20000ms Note: waitForReport has a hard-coded 30 second timeout | ||
|
||
tests: | ||
- label: "Wait for the commissioned device to be retrieved" | ||
cluster: DelayCommands | ||
command: WaitForCommissionee | ||
arguments: | ||
values: | ||
- name: nodeId | ||
value: nodeId | ||
# Step 1 | ||
- label: "TH reads the ActiveDatasetTimestamp attribute from the DUT" | ||
command: readAttribute | ||
attribute: ActiveDatasetTimestamp | ||
response: | ||
saveAs: initialActiveTimestamp | ||
constraints: | ||
type: int64u | ||
|
||
- label: "If the ActiveDatasetTimestamp attribute not null, go to step 4" | ||
cluster: EqualityCommands | ||
command: UnsignedNumberEquals | ||
arguments: | ||
values: | ||
- name: Value1 | ||
value: initialActiveTimestamp | ||
- name: Value2 | ||
value: null | ||
response: | ||
- values: | ||
- name: Equals | ||
saveAs: noActiveDataset | ||
|
||
# Step 2 | ||
- label: "TH sends ArmFailSafe command to the DUT" | ||
runIf: noActiveDataset | ||
cluster: General Commissioning | ||
command: ArmFailSafe | ||
endpoint: 0 | ||
arguments: | ||
values: | ||
- name: ExpiryLengthSeconds | ||
value: 60 | ||
- name: Breadcrumb | ||
value: 1 | ||
|
||
# Step 3 | ||
- label: "TH sends a valid ActiveDatasetRequest command to the DUT" | ||
runIf: noActiveDataset | ||
command: SetActiveDatasetRequest | ||
arguments: | ||
values: | ||
- name: ActiveDataset | ||
value: PIXIT.TBRM.THREAD_ACTIVE_DATASET | ||
|
||
# Step 4 | ||
- label: "TH reads the PendingDatasetTimestamp attribute from the DUT" | ||
command: readAttribute | ||
attribute: PendingDatasetTimestamp | ||
response: | ||
saveAs: initialPendingTimestamp | ||
constraints: | ||
type: int64u | ||
|
||
# Step 5 | ||
- label: "TH sends a SetPendingDatasetRequest command to the DUT" | ||
command: SetPendingDatasetRequest | ||
arguments: | ||
values: | ||
- name: PendingDataset | ||
value: PIXIT.TBRM.THREAD_PENDING_DATASET | ||
|
||
# Step 6 | ||
- label: "TH sends a GetPendingDatasetRequest command to the DUT" | ||
command: GetPendingDatasetRequest | ||
response: | ||
values: | ||
- name: Dataset | ||
constraints: | ||
type: octet_string | ||
# TODO: This should be PIXIT.TBRM.THREAD_PENDING_DATASET but ignoring the Delay Timer element if present | ||
|
||
# Step 7 | ||
- label: "TH reads the PendingDatasetTimestamp attribute from the DUT" | ||
command: readAttribute | ||
attribute: PendingDatasetTimestamp | ||
response: | ||
constraints: | ||
type: int64u | ||
notValue: initialPendingTimestamp | ||
|
||
# Step 8 | ||
- label: | ||
"TH subscribes to the ActiveDatasetTimestamp attribute from the DUT" | ||
command: subscribeAttribute | ||
attribute: ActiveDatasetTimestamp | ||
minInterval: 1 | ||
maxInterval: 70 | ||
response: | ||
constraints: | ||
type: int64u | ||
hasValue: true # not null | ||
|
||
- label: "TH waits for an ActiveDatasetTimestamp report" | ||
command: waitForReport | ||
attribute: ActiveDatasetTimestamp | ||
# TODO: waitForReport uses a hard-coded timeout of 30s, should be configurable? | ||
response: | ||
constraints: | ||
hasValue: true | ||
|
||
# Step 9 | ||
- label: "TH reads the PendingDatasetTimestamp attribute from the DUT" | ||
command: readAttribute | ||
attribute: PendingDatasetTimestamp | ||
response: | ||
value: null | ||
|
||
# Step 10 | ||
- label: "TH sends a valid GetActiveDatasetRequest command to the DUT" | ||
command: GetActiveDatasetRequest | ||
response: | ||
values: | ||
- name: Dataset | ||
# TODO: This should be PIXIT.TBRM.THREAD_PENDING_DATASET without the Delay Timer and Pending Timestamp elements | ||
constraints: | ||
type: octet_string | ||
|
||
# Step 11 | ||
- label: "TH reads the InterfaceEnabled attribute from the DUT" | ||
command: readAttribute | ||
attribute: InterfaceEnabled | ||
response: | ||
value: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.