diff --git a/examples/chip-tool/templates/tests.js b/examples/chip-tool/templates/tests.js index 1ef8cdb0722018..1bc943db00cbdb 100644 --- a/examples/chip-tool/templates/tests.js +++ b/examples/chip-tool/templates/tests.js @@ -202,7 +202,7 @@ function getTests() ]; const ThreadNetworkDiagnostics = [ - 'Test_TC_DIAGTH_1_1', + 'Test_TC_DIAG_TH_NW_1_1', ]; const WiFiNetworkDiagnostics = [ diff --git a/src/app/tests/suites/certification/Test_TC_DIAGTH_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DIAGTH_1_1.yaml deleted file mode 100644 index 108ad17433d0db..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DIAGTH_1_1.yaml +++ /dev/null @@ -1,116 +0,0 @@ -# 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: 15.1.1. [TC-DIAGTH-1.1] Global attributes with server as DUT - -config: - cluster: "Thread Network Diagnostics" - endpoint: 0 - -tests: - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - - - label: "read the global attribute: ClusterRevision" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 1 - - - label: "Read the global attribute constraints: ClusterRevision" - command: "readAttribute" - attribute: "ClusterRevision" - response: - constraints: - type: uint16 - - - label: - "write the default values to mandatory global attribute: - ClusterRevision" - command: "writeAttribute" - attribute: "ClusterRevision" - arguments: - value: 1 - response: - error: UNSUPPORTED_WRITE - - - label: "reads back global attribute: ClusterRevision" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 1 - - - label: "Read the global attribute: AttributeList" - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: "Read the global attribute: EventList" - disabled: true - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - - - label: "Read the global attribute: ClientGeneratedCommandList" - disabled: true - command: "readAttribute" - attribute: "ClientGeneratedCommandList" - response: - constraints: - type: list - - - label: "Read the global attribute: ServerGeneratedCommandList" - disabled: true - command: "readAttribute" - attribute: "ServerGeneratedCommandList" - response: - constraints: - type: list - - - label: "read the optional global attribute: FeatureMap" - disabled: true - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 0 - - - label: "Read the optional global attribute : FeatureMap" - disabled: true - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: map32 - - - label: "write the default values to optional global attribute: FeatureMap" - disabled: true - command: "writeAttribute" - attribute: "FeatureMap" - arguments: - value: 0 - response: - error: UNSUPPORTED_WRITE - - - label: "reads back optional global attribute: FeatureMap" - disabled: true - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_DIAG_TH_NW_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DIAG_TH_NW_1_1.yaml new file mode 100644 index 00000000000000..fdf4354c475947 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DIAG_TH_NW_1_1.yaml @@ -0,0 +1,33 @@ +# 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: 51.1. TC-DIAG-TH_NW-1.1 ResetCounts Command[DUT Server] + +config: + cluster: "Thread Network Diagnostics" + endpoint: 0 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + + - label: "Sends ResetCounts command" + command: "ResetCounts" + + - label: "Read the Overruncount attribute" + command: "readAttribute" + attribute: "OverrunCount" + response: + value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_MC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_MC_1_1.yaml index fcb5793f148b45..4e824c399f9ae7 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_1_1.yaml @@ -24,7 +24,6 @@ tests: command: "WaitForCommissionee" - label: "read the global attribute: ClusterRevision" - disabled: true command: "readAttribute" attribute: "ClusterRevision" response: @@ -48,7 +47,6 @@ tests: error: UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" - disabled: true command: "readAttribute" attribute: "ClusterRevision" response: diff --git a/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml index 623b205486bba5..312a1e1e8511e5 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml @@ -25,10 +25,11 @@ tests: #issue #12190 as per spec default value is 3 but expecting 2 - label: "read the global attribute: ClusterRevision" + disabled: true command: "readAttribute" attribute: "ClusterRevision" response: - value: 2 + value: 3 - label: "Read the global attribute constraints: ClusterRevision" command: "readAttribute" @@ -43,7 +44,7 @@ tests: command: "writeAttribute" attribute: "ClusterRevision" arguments: - value: 2 + value: 3 response: error: UNSUPPORTED_WRITE @@ -52,7 +53,7 @@ tests: command: "readAttribute" attribute: "ClusterRevision" response: - value: 2 + value: 3 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_TM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TM_1_1.yaml index c71b7cb286104f..c9fa04bf2dcb61 100644 --- a/src/app/tests/suites/certification/Test_TC_TM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TM_1_1.yaml @@ -25,10 +25,11 @@ tests: #issue #12190 as per spec default value is 4 but expecting 3 - label: "read the global attribute: ClusterRevision" + disabled: true command: "readAttribute" attribute: "ClusterRevision" response: - value: 3 + value: 4 - label: "Read the global attribute constraints: ClusterRevision" command: "readAttribute" @@ -43,15 +44,16 @@ tests: command: "writeAttribute" attribute: "ClusterRevision" arguments: - value: 3 + value: 4 response: error: UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" + disabled: true command: "readAttribute" attribute: "ClusterRevision" response: - value: 3 + value: 4 - label: "Read the global attribute: AttributeList" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml index 9c57ebebce9efb..92dc0d3506c9f7 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml @@ -568,7 +568,6 @@ tests: - label: "Reads optional attributes from DUT: OutdoorTemperature" disabled: true - optional: true command: "readAttribute" attribute: "OutdoorTemperature" response: @@ -577,7 +576,6 @@ tests: - label: "Reads constraints of optional attributes from DUT: OutdoorTemperature" disabled: true - optional: true command: "readAttribute" attribute: "OutdoorTemperature" response: @@ -588,7 +586,6 @@ tests: "Writes the respective default value to optional attributes to DUT: OutdoorTemperature" disabled: true - optional: true command: "writeAttribute" attribute: "OutdoorTemperature" arguments: @@ -596,7 +593,6 @@ tests: - label: "Read back optional attributes from DUT: OutdoorTemperature" disabled: true - optional: true command: "readAttribute" attribute: "OutdoorTemperature" response: @@ -604,7 +600,6 @@ tests: - label: "Reads optional attributes from DUT: Occupancy" disabled: true - optional: true command: "readAttribute" attribute: "Occupancy" response: @@ -612,7 +607,6 @@ tests: - label: "Reads constraints of optional attributes from DUT: Occupancy" disabled: true - optional: true command: "readAttribute" attribute: "Occupancy" response: @@ -625,7 +619,6 @@ tests: "Writes the respective default value to optional attributes to DUT: Occupancy" disabled: true - optional: true command: "writeAttribute" attribute: "Occupancy" arguments: @@ -633,7 +626,6 @@ tests: - label: "Read back optional attributes from DUT: Occupancy" disabled: true - optional: true command: "readAttribute" attribute: "Occupancy" response: @@ -641,7 +633,6 @@ tests: - label: "Reads optionl attributes from DUT: HVACSystemTypeConfiguration" disabled: true - optional: true command: "readAttribute" attribute: "HVACSystemTypeConfiguration" response: @@ -651,7 +642,6 @@ tests: "Reads constraints of optional attributes from DUT: HVACSystemTypeConfiguration" disabled: true - optional: true command: "readAttribute" attribute: "HVACSystemTypeConfiguration" response: @@ -664,7 +654,6 @@ tests: "Writes the respective default value to optional attributes to DUT: HVACSystemTypeConfiguration" disabled: true - optional: true command: "writeAttribute" attribute: "HVACSystemTypeConfiguration" arguments: @@ -673,7 +662,6 @@ tests: - label: "Read back optional attributes from DUT: HVACSystemTypeConfiguration" disabled: true - optional: true command: "readAttribute" attribute: "HVACSystemTypeConfiguration" response: @@ -681,7 +669,6 @@ tests: - label: "Reads optional attributes from DUT: LocalTemperatureCalibration" disabled: true - optional: true command: "readAttribute" attribute: "LocalTemperatureCalibration" response: @@ -691,7 +678,6 @@ tests: "Reads constraints of optional attributes from DUT: LocalTemperatureCalibration" disabled: true - optional: true command: "readAttribute" attribute: "LocalTemperatureCalibration" response: @@ -704,7 +690,6 @@ tests: "Writes the respective default value to optional attributes to DUT: LocalTemperatureCalibration" disabled: true - optional: true command: "writeAttribute" attribute: "LocalTemperatureCalibration" arguments: @@ -713,7 +698,6 @@ tests: - label: "Read back optional attributes from DUT: LocalTemperatureCalibration" disabled: true - optional: true command: "readAttribute" attribute: "LocalTemperatureCalibration" response: @@ -756,7 +740,6 @@ tests: - label: "Reads optional attributes from DUT: RemoteSensing" disabled: true - optional: true command: "readAttribute" attribute: "RemoteSensing" response: @@ -764,7 +747,6 @@ tests: - label: "Reads constraints of optional attributes from DUT: RemoteSensing" disabled: true - optional: true command: "readAttribute" attribute: "RemoteSensing" response: @@ -775,7 +757,6 @@ tests: "Writes the respective default value to optional attributes to DUT: RemoteSensing" disabled: true - optional: true command: "writeAttribute" attribute: "RemoteSensing" arguments: @@ -783,7 +764,6 @@ tests: - label: "Read back optional attributes from DUT: RemoteSensing" disabled: true - optional: true command: "readAttribute" attribute: "RemoteSensing" response: @@ -791,7 +771,6 @@ tests: - label: "Reads optional attributes from DUT: AlarmMask" disabled: true - optional: true command: "readAttribute" attribute: "AlarmMask" response: @@ -799,7 +778,6 @@ tests: - label: "Reads constraints of optional attributes from DUT: AlarmMask" disabled: true - optional: true command: "readAttribute" attribute: "AlarmMask" response: @@ -812,7 +790,6 @@ tests: "Writes the respective default value to optional attributes to DUT: AlarmMask" disabled: true - optional: true command: "writeAttribute" attribute: "AlarmMask" arguments: @@ -822,7 +799,6 @@ tests: - label: "Read back optional attributes from DUT: AlarmMask" disabled: true - optional: true command: "readAttribute" attribute: "AlarmMask" response: @@ -830,7 +806,6 @@ tests: - label: "Reads optional attributes from DUT: ThermostatRunningMode" disabled: true - optional: true command: "readAttribute" attribute: "ThermostatRunningMode" response: @@ -840,7 +815,6 @@ tests: "Reads constraints of optional attributes from DUT: ThermostatRunningMode" disabled: true - optional: true command: "readAttribute" attribute: "ThermostatRunningMode" response: @@ -853,7 +827,6 @@ tests: "Writes the respective default value to optional attributes to DUT: ThermostatRunningMode" disabled: true - optional: true command: "writeAttribute" attribute: "ThermostatRunningMode" arguments: @@ -863,7 +836,6 @@ tests: - label: "Read back optional attributes from DUT: ThermostatRunningMode" disabled: true - optional: true command: "readAttribute" attribute: "ThermostatRunningMode" response: @@ -900,7 +872,6 @@ tests: #issue #11625 default value is 0 as per spec but expecting 7 - label: "Reads optional attributes from DUT: NumberOfWeeklyTransitions" disabled: true - optional: true command: "readAttribute" attribute: "number of weekly transitions" response: @@ -929,7 +900,6 @@ tests: - label: "Read back optional attributes from DUT: NumberOfWeeklyTransitions" disabled: true - optional: true command: "readAttribute" attribute: "number of weekly transitions" response: @@ -938,7 +908,6 @@ tests: #issue #11625 default value is 0 as per spec but expecting 4 - label: "Reads optional attributes from DUT: NumberOfDailyTransitions" disabled: true - optional: true command: "readAttribute" attribute: "number of daily transitions" response: @@ -967,7 +936,6 @@ tests: - label: "Read back optional attributes from DUT: NumberOfDailyTransitions" disabled: true - optional: true command: "readAttribute" attribute: "number of daily transitions" response: @@ -975,7 +943,6 @@ tests: - label: "Reads optional attributes from DUT: TemperatureSetpointHold" disabled: true - optional: true command: "readAttribute" attribute: "TemperatureSetpointHold" response: @@ -985,7 +952,6 @@ tests: "Reads constraints of optional attributes from DUT: TemperatureSetpointHold" disabled: true - optional: true command: "readAttribute" attribute: "TemperatureSetpointHold" response: @@ -998,7 +964,6 @@ tests: "Writes the respective default value to optional attributes to DUT: TemperatureSetpointHold" disabled: true - optional: true command: "writeAttribute" attribute: "TemperatureSetpointHold" arguments: @@ -1006,7 +971,6 @@ tests: - label: "Read back optional attributes from DUT: TemperatureSetpointHold" disabled: true - optional: true command: "readAttribute" attribute: "TemperatureSetpointHold" response: @@ -1015,7 +979,6 @@ tests: - label: "Reads optional attributes from DUT: TemperatureSetpointHoldDuration" disabled: true - optional: true command: "readAttribute" attribute: "TemperatureSetpointHoldDuration" response: @@ -1025,7 +988,6 @@ tests: "Reads constraints of optional attributes from DUT: TemperatureSetpointHoldDuration" disabled: true - optional: true command: "readAttribute" attribute: "TemperatureSetpointHoldDuration" response: @@ -1038,7 +1000,6 @@ tests: "Writes the respective default value to optional attributes to DUT: TemperatureSetpointHoldDuration" disabled: true - optional: true command: "writeAttribute" attribute: "TemperatureSetpointHoldDuration" arguments: @@ -1048,7 +1009,6 @@ tests: "Read back optional attributes from DUT: TemperatureSetpointHoldDuration" disabled: true - optional: true command: "readAttribute" attribute: "TemperatureSetpointHoldDuration" response: @@ -1058,7 +1018,6 @@ tests: "Reads optional attributes from DUT: ThermostatProgrammingOperationMode" disabled: true - optional: true command: "readAttribute" attribute: "ThermostatProgrammingOperationMode" response: @@ -1068,7 +1027,6 @@ tests: "Reads constraints of optional attributes from DUT: ThermostatProgrammingOperationMode" disabled: true - optional: true command: "readAttribute" attribute: "ThermostatProgrammingOperationMode" response: @@ -1081,7 +1039,6 @@ tests: "Writes the respective default value to optional attributes to DUT: ThermostatProgrammingOperationMode" disabled: true - optional: true command: "writeAttribute" attribute: "ThermostatProgrammingOperationMode" arguments: @@ -1091,7 +1048,6 @@ tests: "Read back optional attributes from DUT: ThermostatProgrammingOperationMode" disabled: true - optional: true command: "readAttribute" attribute: "ThermostatProgrammingOperationMode" response: @@ -1101,7 +1057,6 @@ tests: "Reads constraints of optional attributes from DUT: ThermostatRunningState" disabled: true - optional: true command: "readAttribute" attribute: "ThermostatRunningState" response: @@ -1114,7 +1069,6 @@ tests: "Writes the respective default value to optional attributes to DUT: ThermostatRunningState" disabled: true - optional: true command: "writeAttribute" attribute: "ThermostatRunningState" arguments: @@ -1124,7 +1078,6 @@ tests: - label: "Read back optional attributes from DUT: ThermostatRunningState" disabled: true - optional: true command: "readAttribute" attribute: "ThermostatRunningState" response: @@ -1132,7 +1085,6 @@ tests: - label: "Reads optional attributes from DUT: SetpointChangeSource" disabled: true - optional: true command: "readAttribute" attribute: "SetpointChangeSource" response: @@ -1142,7 +1094,6 @@ tests: "Reads constraints of optional attributes from DUT: SetpointChangeSource" disabled: true - optional: true command: "readAttribute" attribute: "SetpointChangeSource" response: @@ -1155,7 +1106,6 @@ tests: "Writes the respective default value to optional attributes to DUT: SetpointChangeSource" disabled: true - optional: true command: "writeAttribute" attribute: "SetpointChangeSource" arguments: @@ -1165,7 +1115,6 @@ tests: - label: "Read back optional attributes from DUT: SetpointChangeSource" disabled: true - optional: true command: "readAttribute" attribute: "SetpointChangeSource" response: @@ -1173,7 +1122,6 @@ tests: - label: "Reads optional attributes from DUT: SetpointChangeAmount" disabled: true - optional: true command: "readAttribute" attribute: "SetpointChangeAmount" response: @@ -1183,7 +1131,6 @@ tests: "Reads constraints of optional attributes from DUT: SetpointChangeAmount" disabled: true - optional: true command: "readAttribute" attribute: "SetpointChangeAmount" response: @@ -1194,7 +1141,6 @@ tests: "Writes the respective default value to optional attributes to DUT: SetpointChangeAmount" disabled: true - optional: true command: "writeAttribute" attribute: "SetpointChangeAmount" arguments: @@ -1204,7 +1150,6 @@ tests: - label: "Read back optional attributes from DUT: SetpointChangeAmount" disabled: true - optional: true command: "readAttribute" attribute: "SetpointChangeAmount" response: @@ -1212,7 +1157,6 @@ tests: - label: "Reads optional attributes from DUT: SetpointChangeSourceTimestamp" disabled: true - optional: true command: "readAttribute" attribute: "SetpointChangeSourceTimestamp" response: @@ -1222,7 +1166,6 @@ tests: "Reads constraints of optional attributes from DUT: SetpointChangeSourceTimestamp" disabled: true - optional: true command: "readAttribute" attribute: "SetpointChangeSourceTimestamp" response: @@ -1233,7 +1176,6 @@ tests: "Writes the respective default value to optional attributes to DUT: SetpointChangeSourceTimestamp" disabled: true - optional: true command: "writeAttribute" attribute: "SetpointChangeSourceTimestamp" arguments: @@ -1244,7 +1186,6 @@ tests: - label: "Read back optional attributes from DUT: SetpointChangeSourceTimestamp" disabled: true - optional: true command: "readAttribute" attribute: "SetpointChangeSourceTimestamp" response: @@ -1252,7 +1193,6 @@ tests: - label: "Reads optional attributes from DUT: OccupiedSetback" disabled: true - optional: true command: "readAttribute" attribute: "OccupiedSetback" response: @@ -1261,7 +1201,6 @@ tests: - label: "Reads constraints of optional attributes from DUT: OccupiedSetback" disabled: true - optional: true command: "readAttribute" attribute: "OccupiedSetback" response: @@ -1274,7 +1213,6 @@ tests: "Writes the respective default value to optional attributes to DUT: OccupiedSetback" disabled: true - optional: true command: "writeAttribute" attribute: "OccupiedSetback" arguments: @@ -1284,7 +1222,6 @@ tests: - label: "Read back optional attributes from DUT: OccupiedSetback" disabled: true - optional: true command: "readAttribute" attribute: "OccupiedSetback" response: @@ -1292,7 +1229,6 @@ tests: - label: "Reads optional attributes from DUT: OccupiedSetbackMin" disabled: true - optional: true command: "readAttribute" attribute: "OccupiedSetbackMin" response: @@ -1301,7 +1237,6 @@ tests: - label: "Reads constraints of optional attributes from DUT: OccupiedSetbackMin" disabled: true - optional: true command: "readAttribute" attribute: "OccupiedSetbackMin" response: @@ -1314,7 +1249,6 @@ tests: "Writes the respective default value to optional attributes to DUT: OccupiedSetbackMin" disabled: true - optional: true command: "writeAttribute" attribute: "OccupiedSetbackMin" arguments: @@ -1322,7 +1256,6 @@ tests: - label: "Read back optional attributes from DUT: OccupiedSetbackMin" disabled: true - optional: true command: "readAttribute" attribute: "OccupiedSetbackMin" response: @@ -1330,7 +1263,6 @@ tests: - label: "Reads optional attributes from DUT: OccupiedSetbackMax" disabled: true - optional: true command: "readAttribute" attribute: "OccupiedSetbackMax" response: @@ -1339,7 +1271,6 @@ tests: - label: "Reads constraints of optional attributes from DUT: OccupiedSetbackMax" disabled: true - optional: true command: "readAttribute" attribute: "OccupiedSetbackMax" response: @@ -1352,7 +1283,6 @@ tests: "Writes the respective default value to optional attributes to DUT: OccupiedSetbackMax" disabled: true - optional: true command: "writeAttribute" attribute: "OccupiedSetbackMax" arguments: @@ -1360,7 +1290,6 @@ tests: - label: "Read back optional attributes from DUT: OccupiedSetbackMax" disabled: true - optional: true command: "readAttribute" attribute: "OccupiedSetbackMax" response: @@ -1368,7 +1297,6 @@ tests: - label: "Reads optional attributes from DUT: UnoccupiedSetback" disabled: true - optional: true command: "readAttribute" attribute: "UnoccupiedSetback" response: @@ -1377,7 +1305,6 @@ tests: - label: "Reads constraints of optional attributes from DUT: UnoccupiedSetback" disabled: true - optional: true command: "readAttribute" attribute: "UnoccupiedSetback" response: @@ -1390,7 +1317,6 @@ tests: "Writes the respective default value to optional attributes to DUT: UnoccupiedSetback" disabled: true - optional: true command: "writeAttribute" attribute: "UnoccupiedSetback" arguments: @@ -1400,7 +1326,6 @@ tests: - label: "Read back optional attributes from DUT: UnoccupiedSetback" disabled: true - optional: true command: "readAttribute" attribute: "UnoccupiedSetback" response: @@ -1408,7 +1333,6 @@ tests: - label: "Reads optional attributes from DUT: UnoccupiedSetbackMin" disabled: true - optional: true command: "readAttribute" attribute: "UnoccupiedSetbackMin" response: @@ -1418,7 +1342,6 @@ tests: "Reads constraints of optional attributes from DUT: UnoccupiedSetbackMin" disabled: true - optional: true command: "readAttribute" attribute: "UnoccupiedSetbackMin" response: @@ -1431,7 +1354,6 @@ tests: "Writes the respective default value to optional attributes to DUT: UnoccupiedSetbackMin" disabled: true - optional: true command: "writeAttribute" attribute: "UnoccupiedSetbackMin" arguments: @@ -1439,7 +1361,6 @@ tests: - label: "Read back optional attributes from DUT: UnoccupiedSetbackMin" disabled: true - optional: true command: "readAttribute" attribute: "UnoccupiedSetbackMin" response: @@ -1447,7 +1368,6 @@ tests: - label: "Reads optional attributes from DUT: UnoccupiedSetbackMax" disabled: true - optional: true command: "readAttribute" attribute: "UnoccupiedSetbackMax" response: @@ -1457,7 +1377,6 @@ tests: "Reads constraints of optional attributes from DUT: UnoccupiedSetbackMax" disabled: true - optional: true command: "readAttribute" attribute: "UnoccupiedSetbackMax" response: @@ -1470,7 +1389,6 @@ tests: "Writes the respective default value to optional attributes to DUT: UnoccupiedSetbackMax" disabled: true - optional: true command: "writeAttribute" attribute: "UnoccupiedSetbackMax" arguments: @@ -1478,7 +1396,6 @@ tests: - label: "Read back optional attributes from DUT: UnoccupiedSetbackMax" disabled: true - optional: true command: "readAttribute" attribute: "UnoccupiedSetbackMax" response: @@ -1486,7 +1403,6 @@ tests: - label: "Reads optional attributes from DUT: EmergencyHeatDelta" disabled: true - optional: true command: "readAttribute" attribute: "EmergencyHeatDelta" response: @@ -1495,7 +1411,6 @@ tests: - label: "Reads constraints of optional attributes from DUT: EmergencyHeatDelta" disabled: true - optional: true command: "readAttribute" attribute: "EmergencyHeatDelta" response: @@ -1506,7 +1421,6 @@ tests: "Writes the respective default value to optional attributes to DUT: EmergencyHeatDelta" disabled: true - optional: true command: "writeAttribute" attribute: "EmergencyHeatDelta" arguments: @@ -1514,7 +1428,6 @@ tests: - label: "Read back optional attributes from DUT: EmergencyHeatDelta" disabled: true - optional: true command: "readAttribute" attribute: "EmergencyHeatDelta" response: @@ -1522,7 +1435,6 @@ tests: - label: "Reads optional attributes from DUT: ACType" disabled: true - optional: true command: "readAttribute" attribute: "ACType" response: @@ -1530,7 +1442,6 @@ tests: - label: "Reads constraints of optional attributes from DUT: ACType" disabled: true - optional: true command: "readAttribute" attribute: "ACType" response: @@ -1543,7 +1454,6 @@ tests: "Writes the respective default value to optional attributes to DUT: ACType" disabled: true - optional: true command: "writeAttribute" attribute: "ACType" arguments: @@ -1551,7 +1461,6 @@ tests: - label: "Read back optional attributes from DUT: ACType" disabled: true - optional: true command: "readAttribute" attribute: "ACType" response: @@ -1559,7 +1468,6 @@ tests: - label: "Reads optional attributes from DUT: ACCapacity" disabled: true - optional: true command: "readAttribute" attribute: "ACCapacity" response: @@ -1567,7 +1475,6 @@ tests: - label: "Reads constraints of optional attributes from DUT: ACCapacity" disabled: true - optional: true command: "readAttribute" attribute: "ACCapacity" response: @@ -1578,7 +1485,6 @@ tests: "Writes the respective default value to optional attributes to DUT: ACCapacity" disabled: true - optional: true command: "writeAttribute" attribute: "ACCapacity" arguments: @@ -1586,7 +1492,6 @@ tests: - label: "Read back optional attributes from DUT: ACCapacity" disabled: true - optional: true command: "readAttribute" attribute: "ACCapacity" response: @@ -1594,7 +1499,6 @@ tests: - label: "Reads optional attributes from DUT: ACRefrigerantType" disabled: true - optional: true command: "readAttribute" attribute: "ACRefrigerantType" response: @@ -1603,7 +1507,6 @@ tests: - label: "Reads constraints of optional attributes from DUT: ACRefrigerantType" disabled: true - optional: true command: "readAttribute" attribute: "ACRefrigerantType" response: @@ -1616,7 +1519,6 @@ tests: "Writes the respective default value to optional attributes to DUT: ACRefrigerantType" disabled: true - optional: true command: "writeAttribute" attribute: "ACRefrigerantType" arguments: @@ -1624,7 +1526,6 @@ tests: - label: "Read back optional attributes from DUT: ACRefrigerantType" disabled: true - optional: true command: "readAttribute" attribute: "ACRefrigerantType" response: @@ -1632,7 +1533,6 @@ tests: - label: "Reads optional attributes from DUT: ACCompressorType" disabled: true - optional: true command: "readAttribute" attribute: "ACCompressorType" response: @@ -1641,7 +1541,6 @@ tests: - label: "Reads constraints of optional attributes from DUT: ACCompressorType" disabled: true - optional: true command: "readAttribute" attribute: "ACCompressorType" response: @@ -1654,7 +1553,6 @@ tests: "Writes the respective default value to optional attributes to DUT: ACCompressorType" disabled: true - optional: true command: "writeAttribute" attribute: "ACCompressorType" arguments: @@ -1662,7 +1560,6 @@ tests: - label: "Read back optional attributes from DUT: ACCompressorType" disabled: true - optional: true command: "readAttribute" attribute: "ACCompressorType" response: @@ -1670,7 +1567,6 @@ tests: - label: "Reads optional attributes from DUT: ACErrorCode" disabled: true - optional: true command: "readAttribute" attribute: "ACErrorCode" response: @@ -1678,7 +1574,6 @@ tests: - label: "Reads constraints of optional attributes from DUT: ACErrorCode" disabled: true - optional: true command: "readAttribute" attribute: "ACErrorCode" response: @@ -1689,7 +1584,6 @@ tests: "Writes the respective default value to optional attributes to DUT: ACErrorCode" disabled: true - optional: true command: "writeAttribute" attribute: "ACErrorCode" arguments: @@ -1697,7 +1591,6 @@ tests: - label: "Read back optional attributes from DUT: ACErrorCode" disabled: true - optional: true command: "readAttribute" attribute: "ACErrorCode" response: @@ -1705,7 +1598,6 @@ tests: - label: "Reads optional attributes from DUT: ACLouverPosition" disabled: true - optional: true command: "readAttribute" attribute: "ACLouverPosition" response: @@ -1714,7 +1606,6 @@ tests: - label: "Reads constraints of optional attributes from DUT: ACLouverPosition" disabled: true - optional: true command: "readAttribute" attribute: "ACLouverPosition" response: @@ -1727,7 +1618,6 @@ tests: "Writes the respective default value to optional attributes to DUT: ACLouverPosition" disabled: true - optional: true command: "writeAttribute" attribute: "ACLouverPosition" arguments: @@ -1735,7 +1625,6 @@ tests: - label: "Read back optional attributes from DUT: ACLouverPosition" disabled: true - optional: true command: "readAttribute" attribute: "ACLouverPosition" response: @@ -1743,7 +1632,6 @@ tests: - label: "Reads optional attributes from DUT: ACCoilTemperature" disabled: true - optional: true command: "readAttribute" attribute: "ACCoilTemperature" response: @@ -1752,7 +1640,6 @@ tests: - label: "Reads constraints of optional attributes from DUT: ACCoilTemperature" disabled: true - optional: true command: "readAttribute" attribute: "ACCoilTemperature" response: @@ -1763,7 +1650,6 @@ tests: "Writes the respective default value to optional attributes to DUT: ACCoilTemperature" disabled: true - optional: true command: "writeAttribute" attribute: "ACCoilTemperature" arguments: @@ -1773,7 +1659,6 @@ tests: - label: "Read back optional attributes from DUT: ACCoilTemperature" disabled: true - optional: true command: "readAttribute" attribute: "ACCoilTemperature" response: @@ -1781,7 +1666,6 @@ tests: - label: "Reads optional attributes from DUT: ACCapacityFormat" disabled: true - optional: true command: "readAttribute" attribute: "ACCapacityFormat" response: @@ -1790,7 +1674,6 @@ tests: - label: "Reads constraints of optional attributes from DUT: ACCapacityFormat" disabled: true - optional: true command: "readAttribute" attribute: "ACCapacityFormat" response: @@ -1801,7 +1684,6 @@ tests: "Writes the respective default value to optional attributes to DUT: ACCapacityFormat" disabled: true - optional: true command: "writeAttribute" attribute: "ACCapacityFormat" arguments: @@ -1809,7 +1691,6 @@ tests: - label: "Read back optional attributes from DUT: ACCapacityFormat" disabled: true - optional: true command: "readAttribute" attribute: "ACCapacityFormat" response: diff --git a/src/darwin/Framework/CHIP/templates/tests.js b/src/darwin/Framework/CHIP/templates/tests.js index acbd8c6b86a8e5..db2debd1fdbc12 100644 --- a/src/darwin/Framework/CHIP/templates/tests.js +++ b/src/darwin/Framework/CHIP/templates/tests.js @@ -186,7 +186,7 @@ function getTests() ]; const ThreadNetworkDiagnostics = [ - 'Test_TC_DIAGTH_1_1', + 'Test_TC_DIAG_TH_NW_1_1', ]; const WiFiNetworkDiagnostics = [ diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 148c5106d153d2..0f93c76c0f7f01 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -14088,6 +14088,30 @@ - (void)testSendClusterTest_TC_MC_1_1_000000_WaitForCommissionee [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - (void)testSendClusterTest_TC_MC_1_1_000001_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the global attribute: ClusterRevision"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 1U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_MC_1_1_000002_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute constraints: ClusterRevision"]; @@ -14106,7 +14130,7 @@ - (void)testSendClusterTest_TC_MC_1_1_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_MC_1_1_000002_WriteAttribute +- (void)testSendClusterTest_TC_MC_1_1_000003_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; @@ -14129,7 +14153,31 @@ - (void)testSendClusterTest_TC_MC_1_1_000002_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_MC_1_1_000003_ReadAttribute +- (void)testSendClusterTest_TC_MC_1_1_000004_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"reads back global attribute: ClusterRevision"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"reads back global attribute: ClusterRevision Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 1U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_MC_1_1_000005_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AttributeList"]; @@ -14885,30 +14933,6 @@ - (void)testSendClusterTest_TC_OCC_1_1_000000_WaitForCommissionee [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - (void)testSendClusterTest_TC_OCC_1_1_000001_ReadAttribute -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"read the global attribute: ClusterRevision"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the global attribute: ClusterRevision Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedShortValue], 2U); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_OCC_1_1_000002_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute constraints: ClusterRevision"]; @@ -14927,7 +14951,7 @@ - (void)testSendClusterTest_TC_OCC_1_1_000002_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_OCC_1_1_000003_WriteAttribute +- (void)testSendClusterTest_TC_OCC_1_1_000002_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; @@ -14938,7 +14962,7 @@ - (void)testSendClusterTest_TC_OCC_1_1_000003_WriteAttribute XCTAssertNotNil(cluster); id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:2U]; + clusterRevisionArgument = [NSNumber numberWithUnsignedShort:3U]; [cluster writeAttributeClusterRevisionWithValue:clusterRevisionArgument completionHandler:^(NSError * _Nullable err) { @@ -14950,7 +14974,7 @@ - (void)testSendClusterTest_TC_OCC_1_1_000003_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_OCC_1_1_000004_ReadAttribute +- (void)testSendClusterTest_TC_OCC_1_1_000003_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AttributeList"]; @@ -20019,32 +20043,6 @@ - (void)testSendClusterTest_TC_TM_1_1_000000_WaitForCommissionee [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - (void)testSendClusterTest_TC_TM_1_1_000001_ReadAttribute -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"read the global attribute: ClusterRevision"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device - endpoint:1 - queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the global attribute: ClusterRevision Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedShortValue], 3U); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TM_1_1_000002_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute constraints: ClusterRevision"]; @@ -20065,7 +20063,7 @@ - (void)testSendClusterTest_TC_TM_1_1_000002_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TM_1_1_000003_WriteAttribute +- (void)testSendClusterTest_TC_TM_1_1_000002_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; @@ -20078,7 +20076,7 @@ - (void)testSendClusterTest_TC_TM_1_1_000003_WriteAttribute XCTAssertNotNil(cluster); id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:3U]; + clusterRevisionArgument = [NSNumber numberWithUnsignedShort:4U]; [cluster writeAttributeClusterRevisionWithValue:clusterRevisionArgument completionHandler:^(NSError * _Nullable err) { @@ -20090,33 +20088,7 @@ - (void)testSendClusterTest_TC_TM_1_1_000003_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_TM_1_1_000004_ReadAttribute -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"reads back global attribute: ClusterRevision"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device - endpoint:1 - queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads back global attribute: ClusterRevision Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedShortValue], 3U); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_TM_1_1_000005_ReadAttribute +- (void)testSendClusterTest_TC_TM_1_1_000003_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AttributeList"]; @@ -23985,7 +23957,7 @@ - (void)testSendClusterTest_TC_TSUIC_2_2_000010_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_DIAGTH_1_1_000000_WaitForCommissionee +- (void)testSendClusterTest_TC_DIAG_TH_NW_1_1_000000_WaitForCommissionee { XCTestExpectation * expectation = [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; @@ -23993,35 +23965,9 @@ - (void)testSendClusterTest_TC_DIAGTH_1_1_000000_WaitForCommissionee WaitForCommissionee(expectation, queue); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_DIAGTH_1_1_000001_ReadAttribute -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"read the global attribute: ClusterRevision"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the global attribute: ClusterRevision Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedShortValue], 1U); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_DIAGTH_1_1_000002_ReadAttribute +- (void)testSendClusterTest_TC_DIAG_TH_NW_1_1_000001_ResetCounts { - XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute constraints: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Sends ResetCounts command"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -24030,8 +23976,8 @@ - (void)testSendClusterTest_TC_DIAGTH_1_1_000002_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); + [cluster resetCountsWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends ResetCounts command Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); @@ -24040,34 +23986,9 @@ - (void)testSendClusterTest_TC_DIAGTH_1_1_000002_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_DIAGTH_1_1_000003_WriteAttribute -{ - XCTestExpectation * expectation = - [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:queue]; - XCTAssertNotNil(cluster); - - id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:1U]; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_DIAGTH_1_1_000004_ReadAttribute +- (void)testSendClusterTest_TC_DIAG_TH_NW_1_1_000002_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"reads back global attribute: ClusterRevision"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the Overruncount attribute"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -24076,14 +23997,14 @@ - (void)testSendClusterTest_TC_DIAGTH_1_1_000004_ReadAttribute queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads back global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the Overruncount attribute Error: %@", err); XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); { id actualValue = value; - XCTAssertEqual([actualValue unsignedShortValue], 1U); + XCTAssertEqual([actualValue unsignedLongLongValue], 0ULL); } [expectation fulfill]; @@ -24091,27 +24012,6 @@ - (void)testSendClusterTest_TC_DIAGTH_1_1_000004_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_DIAGTH_1_1_000005_ReadAttribute -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute: AttributeList"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - (void)testSendClusterTest_TC_WIFIDIAG_1_1_000000_WaitForCommissionee { diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index f87ebe52b2e6f9..149c2049bc2fa6 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -130,7 +130,7 @@ class TestList : public Command printf("Test_TC_TSUIC_1_1\n"); printf("Test_TC_TSUIC_2_1\n"); printf("Test_TC_TSUIC_2_2\n"); - printf("Test_TC_DIAGTH_1_1\n"); + printf("Test_TC_DIAG_TH_NW_1_1\n"); printf("Test_TC_WIFIDIAG_1_1\n"); printf("Test_TC_WIFIDIAG_3_1\n"); printf("Test_TC_WNCV_1_1\n"); @@ -24227,17 +24227,25 @@ class Test_TC_MC_1_1 : public TestCommand err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, - " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, + " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); + err = TestReadsBackGlobalAttributeClusterRevision_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_5(); break; } @@ -24250,7 +24258,7 @@ class Test_TC_MC_1_1 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + const uint16_t mTestCount = 6; chip::Optional mCluster; chip::Optional mEndpoint; @@ -24278,16 +24286,36 @@ class Test_TC_MC_1_1 : public TestCommand (static_cast(context))->OnFailureResponse_2(error); } - static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } + static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) + { + (static_cast(context))->OnSuccessResponse_2(clusterRevision); + } static void OnFailureCallback_3(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_3(error); } - static void OnSuccessCallback_3(void * context, const chip::app::DataModel::DecodableList & attributeList) + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } + + static void OnFailureCallback_4(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_4(error); + } + + static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) + { + (static_cast(context))->OnSuccessResponse_4(clusterRevision); + } + + static void OnFailureCallback_5(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_5(error); + } + + static void OnSuccessCallback_5(void * context, const chip::app::DataModel::DecodableList & attributeList) { - (static_cast(context))->OnSuccessResponse_3(attributeList); + (static_cast(context))->OnSuccessResponse_5(attributeList); } // @@ -24300,7 +24328,7 @@ class Test_TC_MC_1_1 : public TestCommand return WaitForCommissionee(); } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::MediaInputClusterTest cluster; @@ -24318,12 +24346,36 @@ class Test_TC_MC_1_1 : public TestCommand } void OnSuccessResponse_1(uint16_t clusterRevision) + { + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 1U)); + + NextTest(); + } + + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::MediaInputClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_2(uint16_t clusterRevision) { VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() + CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::MediaInputClusterTest cluster; @@ -24333,37 +24385,61 @@ class Test_TC_MC_1_1 : public TestCommand clusterRevisionArgument = 1U; ReturnErrorOnFailure(cluster.WriteAttribute( - clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); return CHIP_NO_ERROR; } - void OnFailureResponse_2(CHIP_ERROR error) + void OnFailureResponse_3(CHIP_ERROR error) { chip::app::StatusIB status(error); VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_2() { ThrowSuccessResponse(); } + void OnSuccessResponse_3() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::MediaInputClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_4(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_4(uint16_t clusterRevision) + { + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 1U)); + + NextTest(); + } + + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::MediaInputClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_3, OnFailureCallback_3)); + this, OnSuccessCallback_5, OnFailureCallback_5)); return CHIP_NO_ERROR; } - void OnFailureResponse_3(CHIP_ERROR error) + void OnFailureResponse_5(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_3(const chip::app::DataModel::DecodableList & attributeList) + void OnSuccessResponse_5(const chip::app::DataModel::DecodableList & attributeList) { VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); @@ -26936,21 +27012,17 @@ class Test_TC_OCC_1_1 : public TestCommand err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); - break; - case 3: ChipLogProgress(chipTool, - " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_4(); + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); break; } @@ -26963,7 +27035,7 @@ class Test_TC_OCC_1_1 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 4; chip::Optional mCluster; chip::Optional mEndpoint; @@ -26991,26 +27063,16 @@ class Test_TC_OCC_1_1 : public TestCommand (static_cast(context))->OnFailureResponse_2(error); } - static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) - { - (static_cast(context))->OnSuccessResponse_2(clusterRevision); - } + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } static void OnFailureCallback_3(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_3(error); } - static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } - - static void OnFailureCallback_4(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_4(error); - } - - static void OnSuccessCallback_4(void * context, const chip::app::DataModel::DecodableList & attributeList) + static void OnSuccessCallback_3(void * context, const chip::app::DataModel::DecodableList & attributeList) { - (static_cast(context))->OnSuccessResponse_4(attributeList); + (static_cast(context))->OnSuccessResponse_3(attributeList); } // @@ -27023,7 +27085,7 @@ class Test_TC_OCC_1_1 : public TestCommand return WaitForCommissionee(); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; @@ -27041,76 +27103,52 @@ class Test_TC_OCC_1_1 : public TestCommand } void OnSuccessResponse_1(uint16_t clusterRevision) - { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 2U)); - - NextTest(); - } - - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::OccupancySensingClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_2(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_2(uint16_t clusterRevision) { VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() + CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t clusterRevisionArgument; - clusterRevisionArgument = 2U; + clusterRevisionArgument = 3U; ReturnErrorOnFailure(cluster.WriteAttribute( - clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); return CHIP_NO_ERROR; } - void OnFailureResponse_3(CHIP_ERROR error) + void OnFailureResponse_2(CHIP_ERROR error) { chip::app::StatusIB status(error); VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_3() { ThrowSuccessResponse(); } + void OnSuccessResponse_2() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::OccupancySensingClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_4, OnFailureCallback_4)); + this, OnSuccessCallback_3, OnFailureCallback_3)); return CHIP_NO_ERROR; } - void OnFailureResponse_4(CHIP_ERROR error) + void OnFailureResponse_3(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_4(const chip::app::DataModel::DecodableList & attributeList) + void OnSuccessResponse_3(const chip::app::DataModel::DecodableList & attributeList) { VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); @@ -36241,25 +36279,17 @@ class Test_TC_TM_1_1 : public TestCommand err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); - break; - case 3: ChipLogProgress(chipTool, - " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); - err = TestReadsBackGlobalAttributeClusterRevision_4(); + " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_5(); + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); break; } @@ -36272,7 +36302,7 @@ class Test_TC_TM_1_1 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; + const uint16_t mTestCount = 4; chip::Optional mCluster; chip::Optional mEndpoint; @@ -36300,36 +36330,16 @@ class Test_TC_TM_1_1 : public TestCommand (static_cast(context))->OnFailureResponse_2(error); } - static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) - { - (static_cast(context))->OnSuccessResponse_2(clusterRevision); - } + static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } static void OnFailureCallback_3(void * context, CHIP_ERROR error) { (static_cast(context))->OnFailureResponse_3(error); } - static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } - - static void OnFailureCallback_4(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_4(error); - } - - static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) - { - (static_cast(context))->OnSuccessResponse_4(clusterRevision); - } - - static void OnFailureCallback_5(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_5(error); - } - - static void OnSuccessCallback_5(void * context, const chip::app::DataModel::DecodableList & attributeList) + static void OnSuccessCallback_3(void * context, const chip::app::DataModel::DecodableList & attributeList) { - (static_cast(context))->OnSuccessResponse_5(attributeList); + (static_cast(context))->OnSuccessResponse_3(attributeList); } // @@ -36342,7 +36352,7 @@ class Test_TC_TM_1_1 : public TestCommand return WaitForCommissionee(); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TemperatureMeasurementClusterTest cluster; @@ -36361,86 +36371,36 @@ class Test_TC_TM_1_1 : public TestCommand } void OnSuccessResponse_1(uint16_t clusterRevision) - { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 3U)); - - NextTest(); - } - - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::TemperatureMeasurementClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_2, OnFailureCallback_2)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_2(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_2(uint16_t clusterRevision) { VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() + CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TemperatureMeasurementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); uint16_t clusterRevisionArgument; - clusterRevisionArgument = 3U; + clusterRevisionArgument = 4U; ReturnErrorOnFailure( cluster.WriteAttribute( - clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); + clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); return CHIP_NO_ERROR; } - void OnFailureResponse_3(CHIP_ERROR error) + void OnFailureResponse_2(CHIP_ERROR error) { chip::app::StatusIB status(error); VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_3() { ThrowSuccessResponse(); } - - CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::TemperatureMeasurementClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_4, OnFailureCallback_4)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_4(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_4(uint16_t clusterRevision) - { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 3U)); - - NextTest(); - } + void OnSuccessResponse_2() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::TemperatureMeasurementClusterTest cluster; @@ -36448,17 +36408,17 @@ class Test_TC_TM_1_1 : public TestCommand ReturnErrorOnFailure( cluster.ReadAttribute( - this, OnSuccessCallback_5, OnFailureCallback_5)); + this, OnSuccessCallback_3, OnFailureCallback_3)); return CHIP_NO_ERROR; } - void OnFailureResponse_5(CHIP_ERROR error) + void OnFailureResponse_3(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_5(const chip::app::DataModel::DecodableList & attributeList) + void OnSuccessResponse_3(const chip::app::DataModel::DecodableList & attributeList) { VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); @@ -42750,17 +42710,17 @@ class Test_TC_TSUIC_2_2 : public TestCommand void OnSuccessResponse_10() { NextTest(); } }; -class Test_TC_DIAGTH_1_1 : public TestCommand +class Test_TC_DIAG_TH_NW_1_1 : public TestCommand { public: - Test_TC_DIAGTH_1_1(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DIAGTH_1_1", credsIssuerConfig), mTestIndex(0) + Test_TC_DIAG_TH_NW_1_1(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DIAG_TH_NW_1_1", credsIssuerConfig), mTestIndex(0) { AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); } - ~Test_TC_DIAGTH_1_1() {} + ~Test_TC_DIAG_TH_NW_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -42769,12 +42729,12 @@ class Test_TC_DIAGTH_1_1 : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DIAGTH_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DIAG_TH_NW_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DIAGTH_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DIAG_TH_NW_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -42792,25 +42752,12 @@ class Test_TC_DIAGTH_1_1 : public TestCommand err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Sends ResetCounts command\n"); + err = TestSendsResetCountsCommand_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); - break; - case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); - err = TestReadsBackGlobalAttributeClusterRevision_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_5(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the Overruncount attribute\n"); + err = TestReadTheOverruncountAttribute_2(); break; } @@ -42823,7 +42770,7 @@ class Test_TC_DIAGTH_1_1 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; + const uint16_t mTestCount = 3; chip::Optional mCluster; chip::Optional mEndpoint; @@ -42836,51 +42783,14 @@ class Test_TC_DIAGTH_1_1 : public TestCommand NextTest(); } - static void OnFailureCallback_1(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_1(error); - } - - static void OnSuccessCallback_1(void * context, uint16_t clusterRevision) - { - (static_cast(context))->OnSuccessResponse_1(clusterRevision); - } - static void OnFailureCallback_2(void * context, CHIP_ERROR error) { - (static_cast(context))->OnFailureResponse_2(error); - } - - static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) - { - (static_cast(context))->OnSuccessResponse_2(clusterRevision); - } - - static void OnFailureCallback_3(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_3(error); - } - - static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } - - static void OnFailureCallback_4(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_4(error); - } - - static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) - { - (static_cast(context))->OnSuccessResponse_4(clusterRevision); - } - - static void OnFailureCallback_5(void * context, CHIP_ERROR error) - { - (static_cast(context))->OnFailureResponse_5(error); + (static_cast(context))->OnFailureResponse_2(error); } - static void OnSuccessCallback_5(void * context, const chip::app::DataModel::DecodableList & attributeList) + static void OnSuccessCallback_2(void * context, uint64_t overrunCount) { - (static_cast(context))->OnSuccessResponse_5(attributeList); + (static_cast(context))->OnSuccessResponse_2(overrunCount); } // @@ -42893,125 +42803,55 @@ class Test_TC_DIAGTH_1_1 : public TestCommand return WaitForCommissionee(); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestSendsResetCountsCommand_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; - chip::Controller::ThreadNetworkDiagnosticsClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; - } + using RequestType = chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::Type; - void OnFailureResponse_1(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_1(uint16_t clusterRevision) - { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 1U)); + RequestType request; - NextTest(); - } + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_1(); + }; - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; - chip::Controller::ThreadNetworkDiagnosticsClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + auto failure = [](void * context, CHIP_ERROR error) { + (static_cast(context))->OnFailureResponse_1(error); + }; - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_2, OnFailureCallback_2)); + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_2(CHIP_ERROR error) + void OnFailureResponse_1(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_2(uint16_t clusterRevision) - { - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); - NextTest(); - } - - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; - chip::Controller::ThreadNetworkDiagnosticsClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - uint16_t clusterRevisionArgument; - clusterRevisionArgument = 1U; - - ReturnErrorOnFailure( - cluster.WriteAttribute( - clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_3(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - } - - void OnSuccessResponse_3() { ThrowSuccessResponse(); } + void OnSuccessResponse_1() { NextTest(); } - CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() + CHIP_ERROR TestReadTheOverruncountAttribute_2() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::ThreadNetworkDiagnosticsClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_4, OnFailureCallback_4)); + cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); return CHIP_NO_ERROR; } - void OnFailureResponse_4(CHIP_ERROR error) + void OnFailureResponse_2(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_4(uint16_t clusterRevision) - { - VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 1U)); - - NextTest(); - } - - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() + void OnSuccessResponse_2(uint64_t overrunCount) { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; - chip::Controller::ThreadNetworkDiagnosticsClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + VerifyOrReturn(CheckValue("overrunCount", overrunCount, 0ULL)); - ReturnErrorOnFailure( - cluster.ReadAttribute( - this, OnSuccessCallback_5, OnFailureCallback_5)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_5(CHIP_ERROR error) - { - chip::app::StatusIB status(error); - ThrowFailureResponse(); - } - - void OnSuccessResponse_5(const chip::app::DataModel::DecodableList & attributeList) - { - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); } }; @@ -89649,7 +89489,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig),