Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TBRM Tests scripts consistency with te2 fixes #35153

Merged
merged 25 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
562d74f
Add files via upload
StephaneGUELEC Aug 2, 2024
ee9e613
Merge branch 'master' into master
StephaneGUELEC Aug 2, 2024
677460e
Update TEST_TC_TBRM_2.2.yaml
StephaneGUELEC Aug 2, 2024
6b4ef88
Update TEST_TC_TBRM_2.3.yaml
StephaneGUELEC Aug 2, 2024
a46b0d7
Update TEST_TC_TBRM_2.4.yaml
StephaneGUELEC Aug 2, 2024
7f4c8ce
Merge branch 'master' into master
StephaneGUELEC Aug 5, 2024
ac8bfc4
Merge branch 'project-chip:master' into master
marchemi Aug 8, 2024
9bf6f46
Merge branch 'project-chip:master' into master
marchemi Aug 21, 2024
df465ff
Test script consitancy wit test plan after TE2
marchemi Aug 22, 2024
ecd90c7
Test script consitancy wit test plan after TE2
marchemi Aug 22, 2024
1b3fdcd
Merge branch 'master' into tbrm-te2-fixes
marchemi Aug 22, 2024
bb69228
Merge branch 'master' into tbrm-te2-fixes
marchemi Aug 23, 2024
bb7d1a3
Merge branch 'project-chip:master' into tbrm-te2-fixes
marchemi Aug 23, 2024
e44455a
Update src/app/tests/suites/certification/Test_TC_TBRM_2_3.yaml
marchemi Aug 26, 2024
722c499
Update src/app/tests/suites/certification/Test_TC_TBRM_2_2.yaml
marchemi Aug 26, 2024
487c697
Merge branch 'master' into tbrm-te2-fixes
marchemi Aug 26, 2024
9f58002
Restyled by whitespace
restyled-commits Aug 26, 2024
2c8c0b7
Restyled by prettier-yaml
restyled-commits Aug 26, 2024
abcbb02
Merge branch 'master' into tbrm-te2-fixes
marchemi Aug 27, 2024
45b6ed2
Test_TC_TBRM_2_4. synchronisation with TC-THNETDIR-2.3 according test…
marchemi Aug 27, 2024
014a9ae
Restyled by whitespace
restyled-commits Aug 27, 2024
065bbda
Merge branch 'master' into tbrm-te2-fixes
marchemi Aug 28, 2024
202148a
Test tweaks to get CI to pass
ksperling-apple Aug 28, 2024
42b09b2
Merge pull request #227 from ksperling-apple/tbrm-te2-fixes
marchemi Aug 28, 2024
033f802
Restyled by prettier-yaml
restyled-commits Aug 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,14 @@
'has_destination': False,
'has_endpoint': False,
},
'EstablishPASESession': {
'alias': 'code-paseonly',
'arguments': {
'nodeId': 'node-id'
},
'has_destination': False,
'has_endpoint': False,
},
'GetCommissionerNodeId': {
'has_destination': False,
'has_endpoint': False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@
<arg name="RCAC" type="octet_string"/>
<arg name="IPK" type="octet_string"/>
</command>

<command source="client" code="5" name="EstablishPASESession">
<arg name="nodeId" type="node_id"/>
<arg name="payload" type="char_string"/>
</command>

</cluster>
</configurator>
Expand Down
22 changes: 20 additions & 2 deletions src/app/tests/suites/certification/Test_TC_TBRM_2_2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,21 @@ tests:
values:
- name: nodeId
value: nodeId

# Step 1
- label: "TH reads the ActiveDatasetTimestamp attribute from the DUT"
command: readAttribute
attribute: ActiveDatasetTimestamp
response:
value: null

# Step 2
- label: "TH reads the PendingDatasetTimestamp attribute from the DUT"
command: readAttribute
attribute: PendingDatasetTimestamp
response:
value: null

# Step 3
- label:
"TH sends a valid ActiveDatasetRequest command to the DUT without
having armed the fail-safe"
Expand All @@ -65,6 +67,7 @@ tests:
response:
error: FAILSAFE_REQUIRED

# Step 4
- label: "TH sends ArmFailSafe command to the DUT"
cluster: General Commissioning
command: ArmFailSafe
Expand All @@ -76,6 +79,7 @@ tests:
- name: Breadcrumb
value: 1

# Step 5
- label: "TH sends an invalid ActiveDatasetRequest command to the DUT"
command: SetActiveDatasetRequest
arguments:
Expand All @@ -85,19 +89,32 @@ tests:
response:
error: INVALID_COMMAND

# Step 6
- label: "TH sends a valid ActiveDatasetRequest command to the DUT"
command: SetActiveDatasetRequest
arguments:
values:
- name: ActiveDataset
value: PIXIT.TBRM.THREAD_ACTIVE_DATASET

# Step 7
- label: "TH sends CommissioningComplete command to the DUT"
cluster: General Commissioning
command: CommissioningComplete
endpoint: 0
response:
values:
- name: "ErrorCode"
value: 0 # SUCCESS
marchemi marked this conversation as resolved.
Show resolved Hide resolved

# Step 8
- label: "TH reads the InterfaceEnabled attribute from the DUT"
command: readAttribute
attribute: InterfaceEnabled
response:
value: true

# Step 9
- label: "TH reads the ActiveDatasetTimestamp attribute from the DUT"
command: readAttribute
attribute: ActiveDatasetTimestamp
Expand All @@ -106,7 +123,8 @@ tests:
constraints:
type: int64u

- label: "TH sends a valid GetActiveDatasetRequest command to the DUT"
# Step 10
- label: "TH send a GetActiveDatasetRequest command to the DUT"
command: GetActiveDatasetRequest
response:
values:
Expand Down
29 changes: 20 additions & 9 deletions src/app/tests/suites/certification/Test_TC_TBRM_2_3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ tests:
constraints:
type: int64u

- label: "If the ActiveDatasetTimestamp attribute not null, go to step 4"
- label: "If the ActiveDatasetTimestamp attribute not null, go to step 5"
cluster: EqualityCommands
command: UnsignedNumberEquals
arguments:
Expand Down Expand Up @@ -86,6 +86,17 @@ tests:
value: PIXIT.TBRM.THREAD_ACTIVE_DATASET

# Step 4
- label: "TH sends CommissioningComplete command to the DUT"
runIf: noActiveDataset
cluster: General Commissioning
command: CommissioningComplete
endpoint: 0
response:
values:
- name: "ErrorCode"
value: 0 # SUCCESS
marchemi marked this conversation as resolved.
Show resolved Hide resolved

# Step 5
- label: "TH reads the PendingDatasetTimestamp attribute from the DUT"
command: readAttribute
attribute: PendingDatasetTimestamp
Expand All @@ -94,15 +105,15 @@ tests:
constraints:
type: int64u

# Step 5
# Step 6
- label: "TH sends a SetPendingDatasetRequest command to the DUT"
command: SetPendingDatasetRequest
arguments:
values:
- name: PendingDataset
value: PIXIT.TBRM.THREAD_PENDING_DATASET

# Step 6
# Step 7
- label: "TH sends a GetPendingDatasetRequest command to the DUT"
command: GetPendingDatasetRequest
response:
Expand All @@ -112,7 +123,7 @@ tests:
type: octet_string
# TODO: This should be PIXIT.TBRM.THREAD_PENDING_DATASET but ignoring the Delay Timer element if present

# Step 7
# Step 8
- label: "TH reads the PendingDatasetTimestamp attribute from the DUT"
command: readAttribute
attribute: PendingDatasetTimestamp
Expand All @@ -121,7 +132,7 @@ tests:
type: int64u
notValue: initialPendingTimestamp

# Step 8
# Step 9
- label:
"TH subscribes to the ActiveDatasetTimestamp attribute from the DUT"
command: subscribeAttribute
Expand All @@ -141,15 +152,15 @@ tests:
constraints:
hasValue: true

# Step 9
# Step 10
- 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"
# Step 11
- label: "TH sends a GetActiveDatasetRequest command to the DUT"
command: GetActiveDatasetRequest
response:
values:
Expand All @@ -158,7 +169,7 @@ tests:
constraints:
type: octet_string

# Step 11
# Step 12
- label: "TH reads the InterfaceEnabled attribute from the DUT"
command: readAttribute
attribute: InterfaceEnabled
Expand Down
41 changes: 41 additions & 0 deletions src/app/tests/suites/certification/Test_TC_TBRM_2_4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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.4] Verify that getting Active or Pending Dataset in the PASE session results in unsupported access"

PICS:
- TBRM.S

config:
nodeId: 0x12344321
payload: MT:Y.K9042C00KA0648G00

tests:
- label: "TH EstablishPASESession"
cluster: CommissionerCommands
endpoint: 0
command: EstablishPASESession
arguments:
values:
- name: nodeId
value: nodeId
- name: payload
value: payload

- label: "TH send GetActiveDatasetRequest command to the DUT in PASE session"
cluster: Thread Border Router Management
endpoint: 1
command: GetActiveDatasetRequest
response:
error: UNSUPPORTED_ACCESS
44 changes: 44 additions & 0 deletions src/app/tests/suites/certification/Test_TC_TBRM_3_1_Simulated.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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-3.1] Functionality with client as DUT"

PICS:
- TBRM.C

config:
nodeId: 0x12344321
cluster: Thread Border Router Management
endpoint: 1

tests:
# Step 1
- label: "DUT send SetActiveDatasetRequest to TH"
PICS: TBRM.C.C03.Tx
wait: "SetActiveDatasetRequest"

# Step 2
- label: "DUT send SetPendingDatasetRequest to TH"
PICS: TBRM.C.C04.Tx
wait: "SetPendingDatasetRequest"

# Step 3
- label: "DUT send GetActiveDatasetRequest to TH"
PICS: TBRM.C.C00.Tx
wait: "GetActiveDatasetRequest"

# Step 4
- label: "DUT send GetPendingDatasetRequest to TH"
PICS: TBRM.C.C01.Tx
wait: "GetPendingDatasetRequest"
Loading