Skip to content

Commit

Permalink
Semi-automated testcases Nov 03 (#30197)
Browse files Browse the repository at this point in the history
* Manual-->Semi-automated testcases
TC-CNET-4.1
TC-CNET-4.2
TC-CNET-4.3
TC-CNET-4.4
TC-CNET-4.5
TC-CNET-4.6
TC-CNET-4.9
TC-CNET-4.10
TC-CNET-4.11
TC-CNET-4.15
TC-CNET-4.16
TC-CNET-4.22

* Restyled by whitespace

* Modified Darwin ciTests.json disabled CNET-4.3

* Modifed ciTests.json file

---------

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Jan 5, 2024
1 parent 588ab1b commit 4195471
Show file tree
Hide file tree
Showing 12 changed files with 1,772 additions and 1,717 deletions.
289 changes: 130 additions & 159 deletions src/app/tests/suites/certification/Test_TC_CNET_4_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# 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.
# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default

name:
12.4.1. [TC-CNET-4.1] [WiFi] Verification for attributes check [DUT-Server]
Expand All @@ -21,197 +20,169 @@ PICS:

config:
nodeId: 0x12344321
cluster: "Basic Information"
cluster: "Network Commissioning"
endpoint: 0
PIXIT.CNET.WIFI_1ST_ACCESSPOINT_SSID:
type: octet_string
defaultValue: "hex:47524C50726976617465"

tests:
- label: "Preconditions"
verification: |
1. DUT supports CNET.S.F00(WI)
2. DUT has a Network Commissioning cluster on endpoint PIXIT.CNET.ENDPOINT_WIFI with FeatureMap attribute of 1
3. DUT is commissioned on PIXIT.CNET.WIFI_1ST_ACCESSPOINT_SSID
4. TH can communicate with the DUT
disabled: true

- label: "Step 1: Factory reset the DUT"
verification: |
disabled: true

Reset Devices to factory defaults
cluster: "LogCommands"
command: "UserPrompt"
PICS: PICS_USER_PROMPT
arguments:
values:
- name: "message"
value: "Factory Reset the DUT and enter 'y' after success"
- name: "expectedValue"
value: "y"

#Issue: https://github.com/project-chip/connectedhomeip/issues/30196
- label: "Step 2: Commission TH and DUT over BLE to setup the Wi-Fi"
verification: |
disabled: true
./chip-tool pairing ble-wifi 0x12344321 <ssid> <password> <setup-pin-code> <discriminator>
[1698912271.738597][32363:32366] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005
[1698912271.738606][32363:32366] CHIP:CTL: Received CommissioningComplete response, errorCode=0
[1698912271.738613][32363:32366] CHIP:CTL: Successfully finished commissioning step 'SendComplete'
[1698912271.738617][32363:32366] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup'
[1698912271.738622][32363:32366] CHIP:CTL: Performing next commissioning step 'Cleanup'
[1698912271.738639][32363:32366] CHIP:IN: SecureSession[0x7fbb04014a50]: MarkForEviction Type:1 LSID:50170
[1698912271.738642][32363:32366] CHIP:SC: SecureSession[0x7fbb04014a50, LSID:50170]: State change 'kActive' --> 'kPendingEviction'
[1698912271.738666][32363:32366] CHIP:IN: SecureSession[0x7fbb04014a50]: Released - Type:1 LSID:50170
[1698912271.738672][32363:32366] CHIP:CTL: Successfully finished commissioning step 'Cleanup'
[1698912271.738677][32363:32366] CHIP:TOO: Device commissioning completed with success
[1698912271.738691][32363:32366] CHIP:DMG: ICR moving to [AwaitingDe]
cluster: "LogCommands"
command: "UserPrompt"
PICS: PICS_USER_PROMPT
arguments:
values:
- name: "message"
value: enter 'y' after successfull Commission"
- name: "expectedValue"
value: "y"

- label:
"Step 3: TH reads Descriptor Cluster from the DUT with EP0 TH reads
ServerList from the DUT"
verification: |
./chip-tool descriptor read server-list 1 0
Via the TH (chip-tool), verify that the server list has value as 49.
[1654250292.680821][5262:5267] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 812190876
[1654250292.681079][5262:5267] CHIP:TOO: server list: 26 entries
[1654250292.681196][5262:5267] CHIP:TOO: [1]: 3
[1654250292.681264][5262:5267] CHIP:TOO: [2]: 4
[1654250292.681327][5262:5267] CHIP:TOO: [3]: 29
[1654250292.681389][5262:5267] CHIP:TOO: [4]: 30
[1654250292.681450][5262:5267] CHIP:TOO: [5]: 31
[1654250292.681525][5262:5267] CHIP:TOO: [6]: 40
[1654250292.681578][5262:5267] CHIP:TOO: [7]: 42
[1654250292.681629][5262:5267] CHIP:TOO: [8]: 43
[1654250292.681680][5262:5267] CHIP:TOO: [9]: 44
[1654250292.681731][5262:5267] CHIP:TOO: [10]: 45
[1654250292.681782][5262:5267] CHIP:TOO: [11]: 46
[1654250292.681833][5262:5267] CHIP:TOO: [12]: 47
[1654250292.681911][5262:5267] CHIP:TOO: [13]: 48
[1654250292.681977][5262:5267] CHIP:TOO: [14]: 49
[1654250292.682038][5262:5267] CHIP:TOO: [15]: 50
[1654250292.682100][5262:5267] CHIP:TOO: [16]: 51
[1654250292.682160][5262:5267] CHIP:TOO: [17]: 52
[1654250292.682220][5262:5267] CHIP:TOO: [18]: 53
[1654250292.682281][5262:5267] CHIP:TOO: [19]: 54
[1654250292.682342][5262:5267] CHIP:TOO: [20]: 55
[1654250292.682404][5262:5267] CHIP:TOO: [21]: 60
[1654250292.682467][5262:5267] CHIP:TOO: [22]: 62
[1654250292.682528][5262:5267] CHIP:TOO: [23]: 63
[1654250292.682590][5262:5267] CHIP:TOO: [24]: 64
[1654250292.682651][5262:5267] CHIP:TOO: [25]: 65
[1654250292.682714][5262:5267] CHIP:TOO: [26]: 1029
disabled: true
cluster: "Descriptor"
command: "readAttribute"
attribute: "ServerList"
response:
constraints:
type: list
contains: [49]

- label: "Step 4: TH reads FeatureMap attribute from the DUT"
verification: |
./chip-tool networkcommissioning read feature-map 1 0
Via the TH (chip-tool), verify that FeatureMap attribute value as 1 for WiFiNetworkInterface.
[1653473169.784344][29771:29776] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFFC DataVersion: 1600858167
[1653473169.784413][29771:29776] CHIP:TOO: FeatureMap: 1
[1653473169.784516][29771:29776] CHIP:EM: Sending Standalone Ack for MessageCounter:3349837 on exchange 7603i
disabled: true

- label: "Step 5: TH reads the MaxNetworks attribute from the DUT"
PICS: CNET.S.A0000
verification: |
./chip-tool networkcommissioning read max-networks 1 0
Via the TH (chip-tool), Verify the MaxNetworks attribute that contains value in the range of 1 to 255.
[1653473181.407542][29777:29782] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0000 DataVersion: 1600858167
[1653473181.407621][29777:29782] CHIP:TOO: MaxNetworks: 1
[1653473181.407725][29777:29782] CHIP:EM: Sending Standalone Ack for MessageCounter:15199397 on exchange 5841i
disabled: true
command: "readAttribute"
attribute: "FeatureMap"
response:
value: 1
constraints:
type: bitmap32

- label:
"Step 6: TH saves the MaxNetworks attribute value as
'MaxNetworksValue' for future use"
verification: |
disabled: true
"Step 5 & 6: TH reads the MaxNetworks attribute from the DUT. TH saves
the MaxNetworks attribute value as 'MaxNetworksValue' for future use"
PICS: CNET.S.A0000
command: "readAttribute"
attribute: "MaxNetworks"
response:
saveAs: MaxNetworksValue
constraints:
type: int8u
minValue: 1
maxValue: 255

- label: "Step 7: TH reads the Networks attribute list from the DUT"
PICS: CNET.S.A0001
verification: |
./chip-tool networkcommissioning read networks 1 0
Via the TH (chip-tool), Verify:
-the Networks attribute has NetworkID that should the type of octstr with a length range of 1 to 32.
-that the connected status is in tthe type of bool value as TRUE.
[1654250379.881780][5309:5314] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0001 DataVersion: 3741733376
[1654250379.881974][5309:5314] CHIP:TOO: Networks: 1 entries
[1654250379.882123][5309:5314] CHIP:TOO: [1]: {
[1654250379.882196][5309:5314] CHIP:TOO: NetworkID: 47524C50726976617465
[1654250379.882257][5309:5314] CHIP:TOO: Connected: TRUE
[1654250379.882312][5309:5314] CHIP:TOO: }
disabled: true
command: "readAttribute"
attribute: "Networks"
response:
constraints:
contains:
[
{
NetworkID: PIXIT.CNET.WIFI_1ST_ACCESSPOINT_SSID,
Connected: true,
},
]

- label: "Step 8: TH reads ScanMaxTimeSeconds attribute from the DUT"
PICS: CNET.S.A0002
verification: |
./chip-tool networkcommissioning read scan-max-time-seconds 1 0
Via the TH (chip-tool), Verify the ScanMaxTimeSeconds attribute that contains value in the range of 1 to 255 secs.
[1653473784.850830][29813:29818] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0002 DataVersion: 1600858167
[1653473784.850916][29813:29818] CHIP:TOO: ScanMaxTimeSeconds: 10
[1653473784.851029][29813:29818] CHIP:EM: Sending Standalone Ack for MessageCounter:16671548 on exchange 37205i
disabled: true

- label: "Step 9: TH reads ConnectMaxTimeSeconds Attribute from the DUT"
command: "readAttribute"
attribute: "ScanMaxTimeSeconds"
response:
constraints:
type: int8u
minValue: 1
maxValue: 255

- label: "Step 9: TH reads ConnectMaxTimeSeconds attribute from the DUT"
PICS: CNET.S.A0003
verification: |
./chip-tool networkcommissioning read connect-max-time-seconds 1 0
Via the TH (chip-tool), Verify the ConnectMaxTimeSeconds attribute that contains value in the range of 1 to 255 secs.
[1653473821.367214][29821:29826] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0003 DataVersion: 1600858167
[1653473821.367283][29821:29826] CHIP:TOO: ConnectMaxTimeSeconds: 20
[1653473821.367379][29821:29826] CHIP:EM: Sending Standalone Ack for MessageCounter:187119 on exchange 50022i
disabled: true
command: "readAttribute"
attribute: "ConnectMaxTimeSeconds"
response:
constraints:
type: int8u
minValue: 1
maxValue: 255

- label: "Step 10: TH reads InterfaceEnabled attribute from the DUT"
PICS: CNET.S.A0004
verification: |
./chip-tool networkcommissioning read interface-enabled 1 0
Via the TH (chip-tool), Verify the InterfaceEnabled attribute that contains bool value as True.
[1653473893.275901][29834:29839] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0004 DataVersion: 1600858167
[1653473893.275964][29834:29839] CHIP:TOO: InterfaceEnabled: TRUE
[1653473893.276084][29834:29839] CHIP:EM: Sending Standalone Ack for MessageCounter:13157245 on exchange 55578i
disabled: true
command: "readAttribute"
attribute: "InterfaceEnabled"
response:
value: true
constraints:
type: boolean

- label: "Step 11: TH reads LastNetworkingStatus attribute from the DUT"
PICS: CNET.S.A0005
verification: |
./chip-tool networkcommissioning read last-networking-status 1 0
Via the TH (chip-tool), Verify the LastNetworkingStatus attribute that contains value as 0 that mentions success.
[1653473918.484769][29840:29845] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0005 DataVersion: 1600858167
[1653473918.484843][29840:29845] CHIP:TOO: LastNetworkingStatus: 0
[1653473918.484940][29840:29845] CHIP:EM: Sending Standalone Ack for MessageCounter:10161085 on exchange 18769
disabled: true
command: "readAttribute"
attribute: "LastNetworkingStatus"
response:
value: 0
constraints:
type: NetworkCommissioningStatusEnum

- label:
"Step 12: TH reads the LastNetworkID attribute from the DUT TH reads
"Step 12a: TH reads the LastNetworkID attribute from the DUT. TH reads
the Networks attribute from the DUT"
PICS: CNET.S.A0006
verification: |
./chip-tool networkcommissioning read last-network-id 1 0
Via the TH (chip-tool), Verify:
-that the LastNetworkID attribute that contains NetworkID that should be the type of octstr with a length range 1 to 32.
-if the Networks attribute list is Empty, then LastNetworkID attribute value is null.
[1653474059.383553][27286:27291] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0006 DataVersion: 1912591449
[1653474059.383618][27286:27291] CHIP:TOO: LastNetworkID: 47524C50726976617465
[1653474059.383723][27286:27291] CHIP:EM: Sending Standalone Ack for MessageCounter:6975079 on exchange 34674i
./chip-tool networkcommissioning read networks 1 0
Via the TH (chip-tool), Verify the lastnetworkID is present in the NetworkID in the entries of Network.
[1654250379.881780][5309:5314] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0001 DataVersion: 3741733376
[1654250379.881974][5309:5314] CHIP:TOO: Networks: 1 entries
[1654250379.882123][5309:5314] CHIP:TOO: [1]: {
[1654250379.882196][5309:5314] CHIP:TOO: NetworkID: 47524C50726976617465
[1654250379.882257][5309:5314] CHIP:TOO: Connected: TRUE
[1654250379.882312][5309:5314] CHIP:TOO: }
disabled: true
command: "readAttribute"
attribute: "LastNetworkID"
response:
value: PIXIT.CNET.WIFI_1ST_ACCESSPOINT_SSID
constraints:
type: octet_string
minLength: 1
maxLength: 32

- label: "Step 12b: TH reads the Networks attribute list from the DUT"
PICS: CNET.S.A0001
command: "readAttribute"
attribute: "Networks"
response:
constraints:
contains:
[
{
NetworkID: PIXIT.CNET.WIFI_1ST_ACCESSPOINT_SSID,
Connected: true,
},
]

- label:
"Step 13: TH reads the LastConnectErrorValue attribute from the DUT"
PICS: CNET.S.A0007
verification: |
./chip-tool networkcommissioning read last-connect-error-value 1 0
Via the TH (chip-tool), Verify the LastConnectErrorValue attribute that contains value as null.
[1653474102.061746][29860:29865] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0007 DataVersion: 1600858167
[1653474102.061812][29860:29865] CHIP:TOO: LastConnectErrorValue: null
[1653474102.061934][29860:29865] CHIP:EM: Sending Standalone Ack for MessageCounter:5193529 on exchange 29546i
disabled: true
command: "readAttribute"
attribute: "LastConnectErrorValue"
response:
value: null
constraints:
type: int32s
Loading

0 comments on commit 4195471

Please sign in to comment.