@@ -27,8 +27,10 @@ class HelloTest(MatterBaseTest):
27
27
# This example test does not include the step_ and desc_ markers
28
28
# The MatterBaseTest will assume a single step and create a description
29
29
# based on the test name
30
+ # To work in the Test harness, all tests should be named as
31
+ # TC_PICSCODE_#_#, (substituting the appropriate pics codes and numbers for the test)
30
32
@async_test_body
31
- async def test_names_as_expected (self ):
33
+ async def test_TC_NAMES_2_1 (self ):
32
34
dev_ctrl = self .default_controller
33
35
vendor_name = await self .read_single_attribute (
34
36
dev_ctrl ,
@@ -44,17 +46,19 @@ async def test_names_as_expected(self):
44
46
# for the test, then use self.step(#) to indicate how the test proceeds through the test plan.
45
47
# Support for keeping the TH up to date is built into MatterBaseTest when you use the step()
46
48
# function.
47
- def steps_failure_on_wrong_endpoint (self ) -> list [TestStep ]:
49
+ # If the device needs to be commissioned before running the test, ensure the first step in
50
+ # this function is marked is_commissioning=True.
51
+ def steps_TC_ENDPOINT_2_1 (self ) -> list [TestStep ]:
48
52
steps = [TestStep (1 , "Commissioning, already done" , is_commissioning = True ),
49
53
TestStep (2 , "Read ProductName on endpoint 9999" ),
50
54
]
51
55
return steps
52
56
53
- def desc_failure_on_wrong_endpoint (self ) -> str :
57
+ def desc_TC_ENDPOINT_2_1 (self ) -> str :
54
58
return '#.#.#. [TC-HELLO-x.x] Test Failure On Wrong Endpoint'
55
59
56
60
@async_test_body
57
- async def test_failure_on_wrong_endpoint (self ):
61
+ async def test_TC_ENDPOINT_2_1 (self ):
58
62
self .step (1 ) # Commissioning
59
63
60
64
self .step (2 )
@@ -68,19 +72,19 @@ async def test_failure_on_wrong_endpoint(self):
68
72
asserts .assert_true (isinstance (result , Clusters .Attribute .ValueDecodeFailure ), "Should fail to read on endpoint 9999" )
69
73
asserts .assert_equal (result .Reason .status , Status .UnsupportedEndpoint , "Failure reason should be UnsupportedEndpoint" )
70
74
71
- def steps_pics (self ) -> list [TestStep ]:
75
+ def steps_TC_PICSTEST_2_1 (self ) -> list [TestStep ]:
72
76
steps = [TestStep (1 , "Commissioning, already done" , is_commissioning = True ),
73
77
TestStep (2 , "Skip this step based on pics" ),
74
78
TestStep (3 , "Run this step" ),
75
79
TestStep (4 , "Always skip this step" )
76
80
]
77
81
return steps
78
82
79
- def desc_pics (self ) -> str :
83
+ def desc_TC_PICSTEST_2_1 (self ) -> str :
80
84
return "#.#.#. [TC-HELLO-x.x] Test pics"
81
85
82
86
@async_test_body
83
- async def test_pics (self ):
87
+ async def test_TC_PICSTEST_2_1 (self ):
84
88
self .step (1 ) # commissioning
85
89
print ('This should be run' )
86
90
0 commit comments