Skip to content

Commit

Permalink
Test added aug18 (#21996)
Browse files Browse the repository at this point in the history
* Added Manual Scripts

* Added Auto generated file

* Restyled by whitespace

* Restyled by clang-format

* Added Manual scripts

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
kowsisoundhar12 and restyled-commits authored Aug 18, 2022
1 parent ab02839 commit b1f2fc7
Show file tree
Hide file tree
Showing 51 changed files with 1,178 additions and 938 deletions.
65 changes: 65 additions & 0 deletions src/app/tests/suites/certification/PICS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5490,3 +5490,68 @@ PICS:
"Is the device a Server and capable of generating large data which is
greater than 1 MTU(1280 bytes)"
id: MCORE.IDM.S.LargeData

- label:
"Is the device a Client and supports writing an attribute of DataType
Bool"
id: MCORE.IDM.C.WriteRequest.Attribute.DataType_Bool

- label:
"Is the device a Client and supports writing an attribute of DataType
String"
id: MCORE.IDM.C.WriteRequest.Attribute.DataType_String

- label:
"Is the device a Client and supports writing an attribute of DataType
Unsigned Integer"
id: MCORE.IDM.C.WriteRequest.Attribute.DataType_UnsignedInteger

- label:
"Is the device a Client and supports writing an attribute of DataType
Signed Integer"
id: MCORE.IDM.C.WriteRequest.Attribute.DataType_SignedInteger

- label:
"Is the device a Client and supports writing an attribute of DataType
Struct"
id: MCORE.IDM.C.WriteRequest.Attribute.DataType_Struct

- label:
"Is the device a Client and supports writing an attribute of DataType
Floating Point"
id: MCORE.IDM.C.WriteRequest.Attribute.DataType_FloatingPoint

- label:
"Is the device a Client and supports writing an attribute of DataType
List"
id: MCORE.IDM.C.WriteRequest.Attribute.DataType_List

- label:
"Is the device a Client and supports writing an attribute of DataType
Octet String"
id: MCORE.IDM.C.WriteRequest.Attribute.DataType_OctetString

- label:
"Is the device a Client and supports writing an attribute of DataType
Enum"
id: MCORE.IDM.C.WriteRequest.Attribute.DataType_Enum

- label:
"Is the device a Client and supports writing an attribute of DataType
Bitmap"
id: MCORE.IDM.C.WriteRequest.Attribute.DataType_Bitmap

- label:
"Is the device a Client and supports subscribing to an attribute of
DataType Bool"
id: MCORE.IDM.C.SubscribeRequest.Attribute.DataType_Bool

- label:
"Is the device a Client and supports subscribing to an attribute of
DataType String"
id: MCORE.IDM.C.SubscribeRequest.Attribute.DataType_String

- label:
"Is the device a Client and supports subscribing for multiple
attribute"
id: MCORE.IDM.C.SubscribeRequest.MultipleAttributes
51 changes: 50 additions & 1 deletion src/app/tests/suites/certification/Test_TC_ACL_2_3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,58 @@ config:
endpoint: 0

tests:
- label: "Pre-Conditions"
verification: |
Notes
1.N1 is the node ID of TH1
2.D_OK_EMPTY:"1718" which is an octstr of length 2 containing valid TLV:
- top-level anonymous list (empty)
3.D_OK_SINGLE:"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" which is an octstr of length 50-100 containing valid TLV:
- top-level anonymous list, containing - one element with profile-specific tag in fully-qualified form
4.D_OK_FULL:"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700D00000F1FF02003148656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E7420616761696E2E2E2E2E2E0018" which is an octstr of length 128 containing valid TLV:
- top-level anonymous list, containing - two elements with profile-specific tag in fully-qualified form
5.D_BAD_LENGTH:"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700D00000F1FF02003248656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E7420616761696E2E2E2E2E2E2E0018" which is an octstr of length 129 containing valid TLV:
- top-level anonymous list, containing - one element with profile-specific tag in fully-qualified form
6 .D_BAD_STRUCT: "1518" which is an octstr of length 2 containing valid TLV:
- top-level anonymous struct, empty
7.D_BAD_LIST:"3701D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" which is an octstr of length 50-100 containing valid TLV:
- top-level list with context-specific tag, containing - one element with profile-specific tag in fully-qualified form
8.D_BAD_ELEM:"17103D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" which is an octstr of length 50-100 containing valid TLV:
- top-level anonymous list, containing - one element with anonymous tag
9 .D_BAD_OVERFLOW: "17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018FF" which is an octstr of length 50-100 containing valid TLV:
- top-level anonymous list, containing - one element with profile-specific tag in fully-qualified form - but having extra bytes after the top level list end-of-container
10.D_BAD_UNDERFLOW:"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E6700" which is an octstr of length 50-100 containing invalid TLV:
- top-level anonymous list, containing - one element with profile-specific tag in fully-qualified form - but lacking the top-level list end-of-container
11.D_BAD_NONE: "" which is an octstr of length 0
disabled: true

- label: "TH1 commissions DUT using admin node ID N1"
verification: |
verification step to be updated.
DUT
sudo ./chip-all-clusters-app
TH1
./chip-tool pairing ble-wifi 1 zigbee-thread matter123 20202021 3841
disabled: true

- label:
Expand Down
42 changes: 40 additions & 2 deletions src/app/tests/suites/certification/Test_TC_BIND_2_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,28 @@ config:
endpoint: 0

tests:
- label: "Pre-Conditions"
verification: |
TH2 supports On/Off server on Endpoint 1.
TH3 supports On/Off server on Endpoint 2.
DUT supports On/Off client.
disabled: true

- label: "Note"
verification: |
1.Need 4 raspi for this test case and use 3 raspi as dut[all-cluster-app] and 1 raspi as chip-tool.
2.1st raspi which is used as DUT , which you are going to pair with onnetwork, you need to build shell command on that all clusters app.[build shell on DUT 1 Use - [scripts/examples/gn_build_example.sh examples/all-clusters-app/linux/ out/all-clusters-app chip_inet_config_enable_ipv4=false chip_build_libshell=true ]
3.Pair TH2 , TH3 with ble-wifi with different discriminator as mentioned below, using the chip-tool running on 4th raspi.
4.using chip-tool (on the 4th raspi) write the ACL entries in both TH2 and TH3 allowing to receive commands for onoff cluster from DUT
5.Hit Enter on raspi , you will see shell prompt (>) , enter help, you will command for switch . At the prompt enter switch on ,the on command is sent to both TH2 and TH3. you can see that in the log. to test if the TH2/TH3 are turned on or not, you can read the on-off attribute status. Read the status before sending the switch on command and read after sending the command. you should see the value changing.
disabled: true

- label: "Factory Reset DUT"
verification: |
Vendor specific action, for chip-tool run
Expand Down Expand Up @@ -53,7 +75,7 @@ tests:
verification: |
./chip-tool binding write binding "[{"node" : 2 , "cluster" : "0x0006" , "endpoint" : 1 }, { "node" : 3 , "cluster" : "0x0006" , "endpoint" : 2 }]" 1 1
On TH(Chip-tool), Verify the success response for binding entries
[1657797710.456056][3796:3801] CHIP:DMG: status = 0x00 (SUCCESS),
Expand Down Expand Up @@ -81,19 +103,26 @@ tests:
verification: |
./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [1], "targets": [{"cluster": 6, "endpoint": 1, "deviceType": null}]}]" 2 0
on TH (Chip-tool), Verify the on command receives success response
[1652330385.328196][3240:3245] CHIP:DMG: StatusIB =
[1652330385.328229][3240:3245] CHIP:DMG: {
[1652330385.328264][3240:3245] CHIP:DMG: status = 0x00 (SUCCESS),
[1652330385.328298][3240:3245] CHIP:DMG: },
./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [1], "targets": [{"cluster": 6, "endpoint": 1, "deviceType": null}]}]" 3 0
./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [1], "targets": [{"cluster": 6, "endpoint": 2, "deviceType": null}]}]" 3 0
on TH(Chip-tool), Verify the on command receives success response
[1650610345.847274][2626:2631] CHIP:DMG: StatusIB =
[1650610345.847317][2626:2631] CHIP:DMG: {
[1650610345.847383][2626:2631] CHIP:DMG: status = 0x00 (SUCCESS),
[1650610345.847429][2626:2631] CHIP:DMG: },
NOTE:
Every DUT should have their own mechanism to trigger on/off mechanism ,this for raspi platform
DUT sends on command in the shell
> switch on
Expand Down Expand Up @@ -197,11 +226,15 @@ tests:
verification: |
./chip-tool onoff read on-off 2 1
Verify on TH (Chip-tool),the onoff value is set to ON
[1657798291.396477][3835:3841] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 4260513117
[1657798291.396514][3835:3841] CHIP:TOO: OnOff: TRUE
./chip-tool onoff read on-off 3 2
Verify on TH(Chip-tool) ,the onoff value is set to ON
[1657798691.194894][3869:3874] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 470320746
[1657798691.194948][3869:3874] CHIP:TOO: OnOff: TRUE
disabled: true
Expand All @@ -210,6 +243,8 @@ tests:
verification: |
./chip-tool binding write binding "[{"node" : 2 , "cluster" : "0x0006" , "endpoint" : 1 }]" 1 1
Verify on TH(Chip-tool) ,binding entry receives success response
[1657800844.739833][4000:4006] CHIP:EM: Removed CHIP MessageCounter:244702117 from RetransTable on exchange 12653i
[1657800844.739867][4000:4006] CHIP:DMG: WriteClient moving to [ResponseRe]
[1657800844.739922][4000:4006] CHIP:DMG: WriteResponseMessage =
Expand Down Expand Up @@ -312,6 +347,7 @@ tests:
verification: |
./chip-tool onoff read on-off 2 1
Verify on TH (Chip-tool),the onoff value is set to OFF
[1657803168.769564][4272:4277] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 1968648540
Expand All @@ -323,6 +359,8 @@ tests:
verification: |
./chip-tool onoff read on-off 3 2
Verify on TH(Chip-tool) ,the onoff value is set to ON
[1657803609.731464][4333:4339] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 3914456390
[1657803609.731521][4333:4339] CHIP:TOO: OnOff: TRUE
Expand Down
59 changes: 49 additions & 10 deletions src/app/tests/suites/certification/Test_TC_BIND_2_2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,25 @@ config:
endpoint: 0

tests:
- label: "Note"
verification: |
Chip-tool command used below are an example to verify the DUT as controller test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command.
disabled: true

- label: "Pre-Conditions"
verification: |
TH2 supports On/Off server on Endpoint 1.
TH2 supports Groups server on Endpoint 1.
DUT behaves as Group Admin
TH2 should have an ACL entry with the AuthMode as Group by DUT
DUT supports On/Off client
disabled: true

- label: "Note"
verification: |
Take 2 raspi, 1 as Lighting app and another one as chip-tool. and use [ nRF52840-DK ]Thread device as light-switch-app.
disabled: true

- label: "Factory Reset DUT"
verification: |
Vendor specific action, for chip-tool run
Expand All @@ -34,9 +53,9 @@ tests:

- label: "Commission DUT to TH1s fabric"
verification: |
Run this cmmd in Thread device terminal:
Advertise the [ light-switch-app ] on [ nRF52840-DK ]Thread device and pair the TH using below cmmd.
./chip-tool pairing ble-thread 73 hex:0e080000000000010000000300000f35060004001fffe0020810101191022022920708fd6587bfe9821353051000112237945966880899aabbccddeeff030f7070656e5468726561644465696f6c010212340410f23d85dd55d9748cc6a1fd5fccbb1da20c0402a0fff8 20202021 3840
./chip-tool pairing ble-thread 74 hex:0e080000000000010000000300000f35060004001fffe0020810101191022022920708fd6587bfe9821353051000112237945966880899aabbccddeeff030f7070656e5468726561644465696f6c010212340410f23d85dd55d9748cc6a1fd5fccbb1da20c0402a0fff8 20202021 3840
disabled: true

- label: "TH1 enables DUT as Controller"
Expand All @@ -46,7 +65,9 @@ tests:

- label: "Commission TH2 to TH1s fabric (Node ID = 2)"
verification: |
./chip-tool pairing onnetwork 1 20202021
Advertise the [Lighting-app] on Raspi and pair the TH using below cmmd.
./chip-tool pairing onnetwork 2 20202021
On TH(Chip-tool), Verify the success response
Expand All @@ -68,6 +89,8 @@ tests:
Endpoint 0."
PICS: GRPKEY.C.C00.Tx
verification: |
Run this cmmd for lighting app in chip-tool:
./chip-tool groupkeymanagement key-set-write "{"groupKeySetID": 42,
"groupKeySecurityPolicy": 0, "epochKey0":
"d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1":
Expand Down Expand Up @@ -115,6 +138,8 @@ tests:
list on GroupKeyManagement cluster to TH2 on Endpoint 0"
PICS: GRPKEY.C.A0000
verification: |
Run this cmmd for lighting app in chip-tool:
./chip-tool groupkeymanagement write group-key-map "[{"groupId": 1, "groupKeySetID": 42, "fabricIndex": 1}]" 2 0
On DUT, Verify the success response for GroupKeySetID
Expand All @@ -130,6 +155,8 @@ tests:
Endpoint 1."
PICS: G.C.C00.Tx
verification: |
Run this cmmd for lighting app in chip-tool:
./chip-tool groups add-group 0x0001 grp1 2 1
On DUT, Verify the success response for AddGroup
Expand Down Expand Up @@ -163,7 +190,9 @@ tests:
"TH1 writes Binding entry into DUT with Entry 1: Group = The Group ID
in the AddGroup command sent from DUT to TH2"
verification: |
./chip-tool binding write binding "[{"group" : "0x0001"}]" 73 1
Run this cmmd for [ nRF52840-DK ]Thread device in chip-tool:
./chip-tool binding write binding "[{"group" : "0x0001"}]" 74 1
On TH, Verify the success response for binding entry
Expand All @@ -179,6 +208,8 @@ tests:
entries"
PICS: OO.C.C01.Tx
verification: |
Run this cmmd for [ nRF52840-DK ]Thread device in chip-tool:
./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 4, "authMode": 3, "subjects": [1], "targets": null }]" 74 0
On TH(Chip-tool), Verify the success response for Acl:
Expand All @@ -187,21 +218,25 @@ tests:
[1659075680.944052][2687:2692] CHIP:DMG: {
[1659075680.944116][2687:2692] CHIP:DMG: status = 0x00 (SUCCESS),
./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 4, "authMode": 3, "subjects": [1], "targets": null }]" 1 0
Run this cmmd for lighting app in chip-tool:
./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 4, "authMode": 3, "subjects": [1], "targets": null }]" 2 0
On TH(Chip-tool), Verify the success response for Acl:
[1659075680.943991][2687:2692] CHIP:DMG: StatusIB =
[1659075680.944052][2687:2692] CHIP:DMG: {
[1659075680.944116][2687:2692] CHIP:DMG: status = 0x00 (SUCCESS),
Press button no.2 on thread board
Press button no.2 on [ nRF52840-DK ]thread board
disabled: true

- label: "TH1 reads OnOff attribute from TH2 (Endpoint 1)"
PICS: OO.C.C01.Tx
verification: |
./chip-tool onoff read on-off 1 1
Run this cmmd for lighting app in chip-tool:
./chip-tool onoff read on-off 2 1
On TH (Chip-tool), Verify the value is set to ON
Expand All @@ -211,7 +246,9 @@ tests:

- label: "TH1 removes all the binding entries from DUT"
verification: |
./chip-tool binding write binding "[]" 73 1
Run this cmmd for [ nRF52840-DK ]Thread device in chip-tool:
./chip-tool binding write binding "[]" 74 1
On TH(Chip-tool), Verify the success response for removing binding entry
Expand All @@ -226,13 +263,15 @@ tests:
entries"
PICS: OO.C.C00.Tx
verification: |
Press button no.2 on thread board
Press button no.2 on [ nRF52840-DK ] thread board
disabled: true

- label: "TH1 reads OnOff attribute from TH2 (Endpoint 1)"
PICS: OO.C.C01.Tx
verification: |
./chip-tool onoff read on-off 1 1
Run this cmmd for lighting app in chip-tool:
./chip-tool onoff read on-off 2 1
On TH(Chip-tool), Verify the value is set to ON
Expand Down
Loading

0 comments on commit b1f2fc7

Please sign in to comment.