Skip to content

Commit 5175091

Browse files
Josh V [Apple]pull[bot]
Josh V [Apple]
authored andcommitted
Add simulated device YAML and pics to YAML (#11561)
* Add new YAML tests. * Generated files.
1 parent d5b592e commit 5175091

File tree

7 files changed

+393
-1
lines changed

7 files changed

+393
-1
lines changed

examples/chip-tool/templates/tests.js

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ function getTests()
5555
const DeviceManagement = [
5656
'Test_TC_DM_1_1',
5757
'Test_TC_DM_3_1',
58+
'Test_TC_DM_2_2',
5859
];
5960

6061
const ElectricalMeasurement = [

examples/placeholder/linux/apps/app1/tests.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717

1818
function getTests()
1919
{
20-
const tests = [];
20+
const tests = [
21+
"Test_TC_DM_1_3",
22+
];
2123

2224
return tests.join(', ');
2325
}

src/app/tests/suites/certification/PICS.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,15 @@ PICS:
2222
- label: "Does the device support discovery over WiFi?"
2323
id: WIFI
2424
value: true
25+
26+
- label: "Does the device support manufacturing date"
27+
id: MANF_DATE
28+
value: true
29+
30+
- label: "Does the device support part number"
31+
id: PART_NUM
32+
value: true
33+
34+
- label: "Does the device support Intermediate CA Certificate"
35+
id: DM_ICACERT
36+
value: true

src/app/tests/suites/certification/Test_TC_DM_1_1.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ tests:
109109
- label: "Query ManufacturingDate"
110110
command: "readAttribute"
111111
attribute: "ManufacturingDate"
112+
PICS: MANF_DATE
112113
optional: true
113114
response:
114115
constraints:
@@ -120,6 +121,7 @@ tests:
120121
- label: "Query PartNumber"
121122
command: "readAttribute"
122123
attribute: "PartNumber"
124+
PICS: PART_NUM
123125
optional: true
124126
response:
125127
constraints:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Copyright (c) 2021 Project CHIP Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: 10.1.3. [TC-DM-1.3] Basic Cluster Server Attributes [DUT - Controller]
16+
17+
config:
18+
cluster: "Basic"
19+
endpoint: 0
20+
21+
tests:
22+
- label: "Log OnOff Test Startup"
23+
cluster: "LogCommands"
24+
command: "Log"
25+
arguments:
26+
values:
27+
- name: "message"
28+
value: "*** Basic Cluster Tests Ready"
29+
30+
- label: "Query Interaction Model Version"
31+
wait: "readAttribute"
32+
attribute: "InteractionModelVersion"
33+
34+
- label: "Query Vendor Name"
35+
wait: "readAttribute"
36+
attribute: "VendorName"
37+
38+
- label: "Query VendorID"
39+
wait: "readAttribute"
40+
attribute: "VendorID"
41+
42+
- label: "Query Product Name"
43+
wait: "readAttribute"
44+
attribute: "ProductName"
45+
46+
- label: "Query ProductID"
47+
wait: "readAttribute"
48+
attribute: "ProductID"
49+
50+
- label: "Query User Label"
51+
wait: "readAttribute"
52+
attribute: "UserLabel"
53+
54+
- label: "Query User Location"
55+
wait: "readAttribute"
56+
attribute: "Location"
57+
58+
- label: "Query HardwareVersion"
59+
wait: "readAttribute"
60+
attribute: "HardwareVersion"
61+
62+
- label: "Query HardwareVersionString"
63+
wait: "readAttribute"
64+
attribute: "HardwareVersionString"
65+
66+
- label: "Query SoftwareVersion"
67+
wait: "readAttribute"
68+
attribute: "SoftwareVersion"
69+
70+
- label: "Query SoftwareVersionString"
71+
wait: "readAttribute"
72+
attribute: "SoftwareVersionString"
73+
74+
- label: "Query ManufacturingDate"
75+
wait: "readAttribute"
76+
attribute: "ManufacturingDate"
77+
78+
- label: "Query PartNumber"
79+
wait: "readAttribute"
80+
attribute: "PartNumber"
81+
82+
- label: "Query ProductURL"
83+
wait: "readAttribute"
84+
attribute: "ProductURL"
85+
86+
- label: "Query ProductLabel"
87+
wait: "readAttribute"
88+
attribute: "ProductLabel"
89+
90+
- label: "Query SerialNumber"
91+
wait: "readAttribute"
92+
attribute: "SerialNumber"
93+
94+
- label: "Query LocalConfigDisabled"
95+
wait: "readAttribute"
96+
attribute: "LocalConfigDisabled"
97+
98+
- label: "Query Reachable"
99+
wait: "readAttribute"
100+
attribute: "Reachable"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Copyright (c) 2021 Project CHIP Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: 3.2.2. [TC-DM-2.2] Operational Credential Attributes
16+
17+
config:
18+
cluster: "Operational Credentials"
19+
endpoint: 0
20+
21+
tests:
22+
- label: "Query NOCs"
23+
command: "readAttribute"
24+
# TODO: Enabled and update value when SDK supports this.
25+
disabled: true
26+
attribute: "NOCs"
27+
PICS: DM_ICACERT
28+
response:
29+
value: [{ NOC: 0 }]
30+
constraints:
31+
type: list
32+
33+
- label: "Query NOCs"
34+
command:
35+
"readAttribute"
36+
# TODO: Enabled and update value when SDK supports this.
37+
disabled: true
38+
attribute: "NOCs"
39+
PICS: DM_ICACERT
40+
response:
41+
value: [{ NOC: 0, ICAC: 0 }]
42+
constraints:
43+
type: list
44+
45+
- label: "Query fabrics list"
46+
command: "readAttribute"
47+
attribute: "fabrics list"
48+
response:
49+
value:
50+
[
51+
{
52+
FabricIndex: 0,
53+
RootPublicKey: 65,
54+
VendorID: 65521,
55+
FabricID: 0,
56+
NodeID: 305414945,
57+
Label: "",
58+
},
59+
]
60+
constraints:
61+
type: list
62+
63+
- label: "Query Supported Fabrics"
64+
command: "readAttribute"
65+
attribute: "SupportedFabrics"
66+
response:
67+
value: 16
68+
constraints:
69+
type: uint8
70+
71+
- label: "Query Commissioned Fabrics"
72+
command: "readAttribute"
73+
attribute: "CommissionedFabrics"
74+
response:
75+
value: 1
76+
constraints:
77+
type: uint8
78+
79+
- label: "Query User Trusted Root Certificates"
80+
command: "readAttribute"
81+
attribute: "TrustedRootCertificates"
82+
response:
83+
value: [237]
84+
constraints:
85+
type: list

0 commit comments

Comments
 (0)