Skip to content

Commit

Permalink
Add simulated device YAML and pics to YAML (#11561)
Browse files Browse the repository at this point in the history
* Add new YAML tests.

* Generated files.
  • Loading branch information
Josh V [Apple] authored and pull[bot] committed Jul 7, 2023
1 parent da6f04d commit 1884649
Show file tree
Hide file tree
Showing 7 changed files with 393 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/chip-tool/templates/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ function getTests()
const DeviceManagement = [
'Test_TC_DM_1_1',
'Test_TC_DM_3_1',
'Test_TC_DM_2_2',
];

const ElectricalMeasurement = [
Expand Down
4 changes: 3 additions & 1 deletion examples/placeholder/linux/apps/app1/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

function getTests()
{
const tests = [];
const tests = [
"Test_TC_DM_1_3",
];

return tests.join(', ');
}
Expand Down
12 changes: 12 additions & 0 deletions src/app/tests/suites/certification/PICS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,15 @@ PICS:
- label: "Does the device support discovery over WiFi?"
id: WIFI
value: true

- label: "Does the device support manufacturing date"
id: MANF_DATE
value: true

- label: "Does the device support part number"
id: PART_NUM
value: true

- label: "Does the device support Intermediate CA Certificate"
id: DM_ICACERT
value: true
2 changes: 2 additions & 0 deletions src/app/tests/suites/certification/Test_TC_DM_1_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ tests:
- label: "Query ManufacturingDate"
command: "readAttribute"
attribute: "ManufacturingDate"
PICS: MANF_DATE
optional: true
response:
constraints:
Expand All @@ -120,6 +121,7 @@ tests:
- label: "Query PartNumber"
command: "readAttribute"
attribute: "PartNumber"
PICS: PART_NUM
optional: true
response:
constraints:
Expand Down
100 changes: 100 additions & 0 deletions src/app/tests/suites/certification/Test_TC_DM_1_3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# 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: 10.1.3. [TC-DM-1.3] Basic Cluster Server Attributes [DUT - Controller]

config:
cluster: "Basic"
endpoint: 0

tests:
- label: "Log OnOff Test Startup"
cluster: "LogCommands"
command: "Log"
arguments:
values:
- name: "message"
value: "*** Basic Cluster Tests Ready"

- label: "Query Interaction Model Version"
wait: "readAttribute"
attribute: "InteractionModelVersion"

- label: "Query Vendor Name"
wait: "readAttribute"
attribute: "VendorName"

- label: "Query VendorID"
wait: "readAttribute"
attribute: "VendorID"

- label: "Query Product Name"
wait: "readAttribute"
attribute: "ProductName"

- label: "Query ProductID"
wait: "readAttribute"
attribute: "ProductID"

- label: "Query User Label"
wait: "readAttribute"
attribute: "UserLabel"

- label: "Query User Location"
wait: "readAttribute"
attribute: "Location"

- label: "Query HardwareVersion"
wait: "readAttribute"
attribute: "HardwareVersion"

- label: "Query HardwareVersionString"
wait: "readAttribute"
attribute: "HardwareVersionString"

- label: "Query SoftwareVersion"
wait: "readAttribute"
attribute: "SoftwareVersion"

- label: "Query SoftwareVersionString"
wait: "readAttribute"
attribute: "SoftwareVersionString"

- label: "Query ManufacturingDate"
wait: "readAttribute"
attribute: "ManufacturingDate"

- label: "Query PartNumber"
wait: "readAttribute"
attribute: "PartNumber"

- label: "Query ProductURL"
wait: "readAttribute"
attribute: "ProductURL"

- label: "Query ProductLabel"
wait: "readAttribute"
attribute: "ProductLabel"

- label: "Query SerialNumber"
wait: "readAttribute"
attribute: "SerialNumber"

- label: "Query LocalConfigDisabled"
wait: "readAttribute"
attribute: "LocalConfigDisabled"

- label: "Query Reachable"
wait: "readAttribute"
attribute: "Reachable"
85 changes: 85 additions & 0 deletions src/app/tests/suites/certification/Test_TC_DM_2_2.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: 3.2.2. [TC-DM-2.2] Operational Credential Attributes

config:
cluster: "Operational Credentials"
endpoint: 0

tests:
- label: "Query NOCs"
command: "readAttribute"
# TODO: Enabled and update value when SDK supports this.
disabled: true
attribute: "NOCs"
PICS: DM_ICACERT
response:
value: [{ NOC: 0 }]
constraints:
type: list

- label: "Query NOCs"
command:
"readAttribute"
# TODO: Enabled and update value when SDK supports this.
disabled: true
attribute: "NOCs"
PICS: DM_ICACERT
response:
value: [{ NOC: 0, ICAC: 0 }]
constraints:
type: list

- label: "Query fabrics list"
command: "readAttribute"
attribute: "fabrics list"
response:
value:
[
{
FabricIndex: 0,
RootPublicKey: 65,
VendorID: 65521,
FabricID: 0,
NodeID: 305414945,
Label: "",
},
]
constraints:
type: list

- label: "Query Supported Fabrics"
command: "readAttribute"
attribute: "SupportedFabrics"
response:
value: 16
constraints:
type: uint8

- label: "Query Commissioned Fabrics"
command: "readAttribute"
attribute: "CommissionedFabrics"
response:
value: 1
constraints:
type: uint8

- label: "Query User Trusted Root Certificates"
command: "readAttribute"
attribute: "TrustedRootCertificates"
response:
value: [237]
constraints:
type: list
Loading

0 comments on commit 1884649

Please sign in to comment.