3838
3939
4040class TCP_Tests (MatterBaseTest ):
41+ async def send_arm_cmd (self , payloadCapability : ChipDeviceCtrl .TransportPayloadCapability ) -> None :
42+ cmd = Clusters .GeneralCommissioning .Commands .ArmFailSafe (expiryLengthSeconds = 900 , breadcrumb = 1 )
43+ await self .send_single_cmd (cmd = cmd , endpoint = 0 , payloadCapability = payloadCapability )
44+
45+ @async_test_body
46+ async def teardown_test (self ):
47+ cmd = Clusters .GeneralCommissioning .Commands .ArmFailSafe (expiryLengthSeconds = 0 , breadcrumb = 0 )
48+ await self .send_single_cmd (cmd = cmd , endpoint = 0 ,
49+ payloadCapability = ChipDeviceCtrl .TransportPayloadCapability .LARGE_PAYLOAD )
50+
51+ def pics_SC_8_1 (self ):
52+ return ['MCORE.SC.TCP' ]
4153
4254 # TCP Connection Establishment
4355 @async_test_body
@@ -51,6 +63,9 @@ async def test_TC_SC_8_1(self):
5163 asserts .assert_equal (device .isSessionOverTCPConnection , True , "Session does not have associated TCP connection" )
5264 asserts .assert_equal (device .isActiveSession , True , "Large Payload Session should be active over TCP connection" )
5365
66+ def pics_SC_8_2 (self ):
67+ return ['MCORE.SC.TCP' ]
68+
5469 # Large Payload Session Establishment
5570 @async_test_body
5671 async def test_TC_SC_8_2 (self ):
@@ -62,6 +77,9 @@ async def test_TC_SC_8_2(self):
6277 asserts .fail ("Unable to establish a CASE session over TCP to the device" )
6378 asserts .assert_equal (device .sessionAllowsLargePayload , True , "Session does not have associated TCP connection" )
6479
80+ def pics_SC_8_3 (self ):
81+ return ['MCORE.SC.TCP' ]
82+
6583 # Session Inactive After TCP Disconnect
6684 @async_test_body
6785 async def test_TC_SC_8_3 (self ):
@@ -77,6 +95,9 @@ async def test_TC_SC_8_3(self):
7795 asserts .assert_equal (device .isActiveSession , False ,
7896 "Large Payload Session should not be active after TCP connection closure" )
7997
98+ def pics_SC_8_4 (self ):
99+ return ['MCORE.SC.TCP' ]
100+
80101 # TCP Connect, Disconnect, Then Connect Again
81102 @async_test_body
82103 async def test_TC_SC_8_4 (self ):
@@ -101,7 +122,9 @@ async def test_TC_SC_8_4(self):
101122 asserts .assert_equal (device .isSessionOverTCPConnection , True , "Session does not have associated TCP connection" )
102123 asserts .assert_equal (device .isActiveSession , True , "Large Payload Session should be active over TCP connection" )
103124
104- # OnOff Cluster Toggle Command Over TCP Session
125+ def pics_SC_8_5 (self ):
126+ return ['MCORE.SC.TCP' ]
127+
105128 @async_test_body
106129 async def test_TC_SC_8_5 (self ):
107130
@@ -114,13 +137,14 @@ async def test_TC_SC_8_5(self):
114137 asserts .assert_equal (device .isActiveSession , True , "Large Payload Session should be active over TCP connection" )
115138 asserts .assert_equal (device .sessionAllowsLargePayload , True , "Session does not have associated TCP connection" )
116139
117- commands = Clusters .Objects .OnOff .Commands
118140 try :
119- await self .send_single_cmd (cmd = commands .Toggle (), endpoint = 1 ,
120- payloadCapability = ChipDeviceCtrl .TransportPayloadCapability .LARGE_PAYLOAD )
141+ await self .send_arm_cmd (ChipDeviceCtrl .TransportPayloadCapability .LARGE_PAYLOAD )
121142 except InteractionModelError :
122143 asserts .fail ("Unexpected error returned by DUT" )
123144
145+ def pics_SC_8_6 (self ):
146+ return ['MCORE.SC.TCP' ]
147+
124148 # WildCard Read Over TCP Session
125149 @async_test_body
126150 async def test_TC_SC_8_6 (self ):
@@ -139,6 +163,9 @@ async def test_TC_SC_8_6(self):
139163 except InteractionModelError :
140164 asserts .fail ("Unexpected error returned by DUT" )
141165
166+ def pics_SC_8_7 (self ):
167+ return ['MCORE.SC.TCP' ]
168+
142169 # Use TCP Session If Available For MRP Interaction
143170 @async_test_body
144171 async def test_TC_SC_8_7 (self ):
@@ -152,10 +179,8 @@ async def test_TC_SC_8_7(self):
152179 asserts .assert_equal (device .isActiveSession , True , "Large Payload Session should be active over TCP connection" )
153180 asserts .assert_equal (device .sessionAllowsLargePayload , True , "Session does not have associated TCP connection" )
154181
155- commands = Clusters .Objects .OnOff .Commands
156182 try :
157- await self .send_single_cmd (cmd = commands .Toggle (), endpoint = 1 ,
158- payloadCapability = ChipDeviceCtrl .TransportPayloadCapability .MRP_OR_TCP_PAYLOAD )
183+ self .send_arm_cmd (ChipDeviceCtrl .TransportPayloadCapability .MRP_OR_TCP_PAYLOAD )
159184 except InteractionModelError :
160185 asserts .fail ("Unexpected error returned by DUT" )
161186
0 commit comments