From 1623782f29e84ccc9751b5e33b978d112ecf510e Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Wed, 23 Feb 2022 13:29:13 +0100 Subject: [PATCH] Add TestMultiAdmin --- examples/chip-tool/templates/tests/tests.js | 5 + src/app/tests/suites/TestMultiAdmin.yaml | 141 ++++++++++++++++++++ 2 files changed, 146 insertions(+) create mode 100644 src/app/tests/suites/TestMultiAdmin.yaml diff --git a/examples/chip-tool/templates/tests/tests.js b/examples/chip-tool/templates/tests/tests.js index 4bac24d9801dcc..50a2396663dedb 100644 --- a/examples/chip-tool/templates/tests/tests.js +++ b/examples/chip-tool/templates/tests/tests.js @@ -478,6 +478,10 @@ function getTests() 'TestBinding', ]; + const MultiAdmin = [ + 'TestMultiAdmin', + ]; + const SoftwareDiagnostics = [ 'Test_TC_SWDIAG_1_1', 'Test_TC_SWDIAG_2_1', @@ -529,6 +533,7 @@ function getTests() WindowCovering, // TV, // Others, // + MultiAdmin, // SoftwareDiagnostics, // Subscriptions, // DoorLock, // diff --git a/src/app/tests/suites/TestMultiAdmin.yaml b/src/app/tests/suites/TestMultiAdmin.yaml new file mode 100644 index 00000000000000..be4c9ba14a8f84 --- /dev/null +++ b/src/app/tests/suites/TestMultiAdmin.yaml @@ -0,0 +1,141 @@ +# Copyright (c) 2022 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: Test Multi Admin + +config: + nodeId: 0x12344321 + nodeId2: + type: NODE_ID + defaultValue: 0xCAFE + nodeId3: + type: NODE_ID + defaultValue: 0xC00FEE + endpoint: 0 + discriminator: + type: INT16U + defaultValue: 3840 + payload: + type: CHAR_STRING + defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically + +tests: + - label: "Reboot target device" + cluster: "SystemCommands" + command: "Reboot" + arguments: + values: + - name: "discriminator" + value: discriminator + + - label: "Wait for the commissioned device to be retrieved for alpha" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Open Commissioning Window from alpha" + cluster: "AdministratorCommissioning" + command: "OpenBasicCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 120 + + - label: "Commission from beta" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithQRCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload + + - label: "Wait for the commissioned device to be retrieved for beta" + identity: "beta" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId2 + + - label: "Open Commissioning Window from beta" + identity: "beta" + cluster: "AdministratorCommissioning" + command: "OpenBasicCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 120 + + - label: "Commission from gamma" + identity: "gamma" + cluster: "CommissionerCommands" + command: "PairWithQRCode" + arguments: + values: + - name: "nodeId" + value: nodeId3 + - name: "payload" + value: payload + + - label: "Wait for the commissioned device to be retrieved for gamma" + identity: "gamma" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId3 + + - label: "read the mandatory attribute: NodeLabel from alpha" + identity: "alpha" + cluster: "Basic" + command: "readAttribute" + attribute: "NodeLabel" + response: + value: "" + saveAs: readFromAlpha + + - label: "write the mandatory attribute NodeLabel from beta" + identity: "beta" + cluster: "Basic" + command: "writeAttribute" + attribute: "NodeLabel" + arguments: + value: "written from beta" + + - label: "read the mandatory attribute: NodeLabel from gamma" + identity: "gamma" + cluster: "Basic" + command: "readAttribute" + attribute: "NodeLabel" + response: + constraints: + notValue: readFromAlpha + + - label: "write the mandatory attribute NodeLabel back to default" + identity: "alpha" + cluster: "Basic" + command: "writeAttribute" + attribute: "NodeLabel" + arguments: + value: readFromAlpha