From a893791715f8b6c774fb3f42cc2564d8173fd875 Mon Sep 17 00:00:00 2001 From: Mark Trayer Date: Tue, 23 May 2023 09:17:24 -0500 Subject: [PATCH 1/5] YAML for OpState TC 1.1. First draft. --- .../certification/Test_TC_OPSTATE_1_1.yaml | 159 ++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml diff --git a/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml new file mode 100644 index 00000000000000..4ac4fa66e17f6e --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml @@ -0,0 +1,159 @@ +# 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: xx.1.1. [TC-OPSTATE-1.1] Global attributes with server as DUT + +PICS: + - OPSTATE.S + +config: + nodeId: 0x12344321 + cluster: "Operational State" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH reads the ClusterRevision attribute from the DUT" + PICS: OPSTATE.S.Afffd + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: int16u + + - label: "TH reads the FeatureMap attribute from the DUT" + PICS: + OPSTATE.S.Afffc + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 + + - label: "TH reads the AttributeList attribute from the DUT" + PICS: OPSTATE.S.Afffb + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: + [ + 0, + 1, + 3, + 4, + 5, + 65528, + 65529, + 65530, + 65531, + 65532, + 65533, + ] + + - label: + "TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList + from the DUT" + PICS: OPSTATE.S.A0002 && OPSTATE.S.Afffb + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [2] + + - label: + "TH reads from the DUT the EventList attribute." + PICS: OPSTATE.S.Afffa + command: "readAttribute" + attribute: "EventList" + response: + constraints: + type: list + contains: [0x00] + + - label: + "TH reads from the DUT the optional event(OperationCompletion) in EventList." + PICS: OPSTATE.S.E01 && OPSTATE.S.Afffa + command: "readAttribute" + attribute: "EventList" + response: + constraints: + type: list + contains: [0x01] + + - label: "Read the optional command(Start) in AcceptedCommandList" + PICS: OPSTATE.S.C00 && OPSTATE.S.Afff9 + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [ + 0, + 1 + ] + + - label: "Read the optional command(Stop) in AcceptedCommandList" + PICS: OPSTATE.S.C01 && OPSTATE.S.Afff9 + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [1] + + + - label: "Read the optional command(Pause) in AcceptedCommandList" + PICS: OPSTATE.S.C02 && OPSTATE.S.Afff9 + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [ + 2, + 3 + ] + + - label: "Read the optional command(Resume) in AcceptedCommandList" + PICS: OPSTATE.S.C03 && OPSTATE.S.Afff9 + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [ + 2, + 3 + ] + + - label: "Read the global attribute: GeneratedCommandList" + PICS: OPSTATE.S.Afff8 && (OPSTATE.S.C00 || OPSTATE.S.C01 || OPSTATE.S.C02 || OPSTATE.S.C03) + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + constraints: + type: list + contains: [4] \ No newline at end of file From f53e6279651461848d5efb02a3cb7b08f8a5de5d Mon Sep 17 00:00:00 2001 From: Mark Trayer Date: Wed, 24 May 2023 08:24:44 -0500 Subject: [PATCH 2/5] Address review comments: - copyright date - command id correction (should be pause=0, stop=1, start=2, resume=3) --- .../suites/certification/Test_TC_OPSTATE_1_1.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml index 4ac4fa66e17f6e..0ffd5e86390a78 100644 --- a/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Project CHIP Authors +# Copyright (c) 2023 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. @@ -111,8 +111,8 @@ tests: constraints: type: list contains: [ - 0, - 1 + 1, + 2 ] - label: "Read the optional command(Stop) in AcceptedCommandList" @@ -133,7 +133,7 @@ tests: constraints: type: list contains: [ - 2, + 0, 3 ] @@ -145,7 +145,7 @@ tests: constraints: type: list contains: [ - 2, + 0, 3 ] From 1416d5ed917927741ee1b366b2480a766c957920 Mon Sep 17 00:00:00 2001 From: Mark Trayer Date: Thu, 25 May 2023 13:14:32 -0500 Subject: [PATCH 3/5] Correct the PICS code and Command ID for Pause and Start --- src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml index 0ffd5e86390a78..14efd6de7d3323 100644 --- a/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml @@ -104,7 +104,7 @@ tests: contains: [0x01] - label: "Read the optional command(Start) in AcceptedCommandList" - PICS: OPSTATE.S.C00 && OPSTATE.S.Afff9 + PICS: OPSTATE.S.C02 && OPSTATE.S.Afff9 command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -126,7 +126,7 @@ tests: - label: "Read the optional command(Pause) in AcceptedCommandList" - PICS: OPSTATE.S.C02 && OPSTATE.S.Afff9 + PICS: OPSTATE.S.C00 && OPSTATE.S.Afff9 command: "readAttribute" attribute: "AcceptedCommandList" response: From 2c178b0651e5d54c4da29cfc0f0d1416d1576f95 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Thu, 25 May 2023 18:16:48 +0000 Subject: [PATCH 4/5] Restyled by whitespace --- src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml index 14efd6de7d3323..a8ccbfd0f64040 100644 --- a/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml @@ -73,7 +73,7 @@ tests: ] - label: - "TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList + "TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList from the DUT" PICS: OPSTATE.S.A0002 && OPSTATE.S.Afffb command: "readAttribute" @@ -92,7 +92,7 @@ tests: constraints: type: list contains: [0x00] - + - label: "TH reads from the DUT the optional event(OperationCompletion) in EventList." PICS: OPSTATE.S.E01 && OPSTATE.S.Afffa @@ -156,4 +156,4 @@ tests: response: constraints: type: list - contains: [4] \ No newline at end of file + contains: [4] From d80b0d29c7ffa017b60f4701656897b8028c0144 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Thu, 25 May 2023 18:16:50 +0000 Subject: [PATCH 5/5] Restyled by prettier-yaml --- .../certification/Test_TC_OPSTATE_1_1.yaml | 47 +++++-------------- 1 file changed, 13 insertions(+), 34 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml index a8ccbfd0f64040..3f5e2e062c46f8 100644 --- a/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPSTATE_1_1.yaml @@ -41,8 +41,7 @@ tests: type: int16u - label: "TH reads the FeatureMap attribute from the DUT" - PICS: - OPSTATE.S.Afffc + PICS: OPSTATE.S.Afffc command: "readAttribute" attribute: "FeatureMap" response: @@ -58,23 +57,11 @@ tests: constraints: type: list contains: - [ - 0, - 1, - 3, - 4, - 5, - 65528, - 65529, - 65530, - 65531, - 65532, - 65533, - ] + [0, 1, 3, 4, 5, 65528, 65529, 65530, 65531, 65532, 65533] - label: - "TH reads from the DUT the optional attribute(CountdownTime) in the AttributeList - from the DUT" + "TH reads from the DUT the optional attribute(CountdownTime) in the + AttributeList from the DUT" PICS: OPSTATE.S.A0002 && OPSTATE.S.Afffb command: "readAttribute" attribute: "AttributeList" @@ -83,8 +70,7 @@ tests: type: list contains: [2] - - label: - "TH reads from the DUT the EventList attribute." + - label: "TH reads from the DUT the EventList attribute." PICS: OPSTATE.S.Afffa command: "readAttribute" attribute: "EventList" @@ -94,7 +80,8 @@ tests: contains: [0x00] - label: - "TH reads from the DUT the optional event(OperationCompletion) in EventList." + "TH reads from the DUT the optional event(OperationCompletion) in + EventList." PICS: OPSTATE.S.E01 && OPSTATE.S.Afffa command: "readAttribute" attribute: "EventList" @@ -110,10 +97,7 @@ tests: response: constraints: type: list - contains: [ - 1, - 2 - ] + contains: [1, 2] - label: "Read the optional command(Stop) in AcceptedCommandList" PICS: OPSTATE.S.C01 && OPSTATE.S.Afff9 @@ -124,7 +108,6 @@ tests: type: list contains: [1] - - label: "Read the optional command(Pause) in AcceptedCommandList" PICS: OPSTATE.S.C00 && OPSTATE.S.Afff9 command: "readAttribute" @@ -132,10 +115,7 @@ tests: response: constraints: type: list - contains: [ - 0, - 3 - ] + contains: [0, 3] - label: "Read the optional command(Resume) in AcceptedCommandList" PICS: OPSTATE.S.C03 && OPSTATE.S.Afff9 @@ -144,13 +124,12 @@ tests: response: constraints: type: list - contains: [ - 0, - 3 - ] + contains: [0, 3] - label: "Read the global attribute: GeneratedCommandList" - PICS: OPSTATE.S.Afff8 && (OPSTATE.S.C00 || OPSTATE.S.C01 || OPSTATE.S.C02 || OPSTATE.S.C03) + PICS: + OPSTATE.S.Afff8 && (OPSTATE.S.C00 || OPSTATE.S.C01 || OPSTATE.S.C02 || + OPSTATE.S.C03) command: "readAttribute" attribute: "GeneratedCommandList" response: