Skip to content

Commit 50085be

Browse files
committed
Autogen'd the TestSteps from latest test plan
1 parent 4307db7 commit 50085be

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

src/python_testing/TC_DEM_2_10.py

+12-17
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def steps_TC_DEM_2_10(self) -> list[TestStep]:
6262
"""Execute the test steps."""
6363
steps = [
6464
TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"),
65-
TestStep("2", "TH reads from the DUT the FeatureMap attribute",
65+
TestStep("2", "TH reads from the DUT the FeatureMap",
6666
"Verify that the DUT response contains the FeatureMap attribute. Store the value as FeatureMap."),
6767
TestStep("3", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster",
6868
"Value has to be 1 (True)"),
@@ -72,30 +72,26 @@ def steps_TC_DEM_2_10(self) -> list[TestStep]:
7272
"Verify DUT responds w/ status SUCCESS(0x00)"),
7373
TestStep("5a", "TH reads from the DUT the OptOutState",
7474
"Value has to be 0x00 (NoOptOut)"),
75-
TestStep("6", "If {PICS_S_FA} {featIsNotSupported} skip to step 14",
76-
"Value has to be 0x00 (NoOptOut)"),
77-
75+
TestStep("6", "If ForecastAdjustment feature is not supported on the cluster skip steps 7 to 14"),
7876
TestStep("7", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.DEM.TESTEVENTTRIGGER for Forecast Adjustment Test Event",
7977
"Verify DUT responds w/ status SUCCESS(0x00)"),
8078
TestStep("7a", "TH reads from the DUT the ESAState",
8179
"Value has to be 0x01 (Online)"),
8280
TestStep("8", "Reset all accumulated report counts, then wait 12 seconds"),
8381
TestStep("9", "TH counts all report transactions with an attribute report for the Forecast attribute",
84-
"TH verifies that numberOfReportsReceived \<= 2"),
82+
"TH verifies that numberOfReportsReceived <= 2"),
8583
TestStep("10", "TH reads from the DUT the Forecast",
8684
"Value has to include slots[0].MinDurationAdjustment, slots[0].MaxDurationAdjustment"),
87-
TestStep("11", "TH sends command ModifyForecastRequest... TODO",
85+
TestStep("11", "If PowerForecastReporting feature is supported on the cluster TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MaxDurationAdjustment, NominalPower=forecast.slots[0].minPowerAdjustment}, Cause=GridOptimization, else StateForecastReporting shall be used, omit the NominalPower: TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization",
86+
"Verify DUT responds w/ status SUCCESS(0x00)"),
87+
TestStep("12", "TH resets all accumulated report counts, then TH sends command CancelRequest",
8888
"Verify DUT responds w/ status SUCCESS(0x00)"),
89-
90-
TestStep("12", "TH resets all accumulated report counts, then TH sends command CancelRequest//// TODO"),
91-
9289
TestStep("13", "Wait 5 seconds"),
93-
94-
TestStep("13a", "TH counts all report transactions with an attribute report for the Forecast attribute_",
95-
"TH verifies that numberOfReportsReceived >= 1 and Value has to include ForecastUpdateReason=InternalOptimization in the last attribute report received."),
96-
97-
TestStep("14", "Clear forecast trigger --- TODO"),
98-
TestStep("15", "If {PICS_S_PA} {featIsNotSupported} skip to step 22 - TODO", ""),
90+
TestStep("13a", "TH counts all report transactions with an attribute report for the Forecast attribute",
91+
"TH verifies that numberOfReportsReceived >= 1"),
92+
TestStep("14", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.DEM.TESTEVENTTRIGGER for Forecast Adjustment Test Event Clear",
93+
"Verify DUT responds w/ status SUCCESS(0x00)"),
94+
TestStep("15", "If PowerAdjustment feature is not supported on the cluster skip steps 16 to 21"),
9995
TestStep("16", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.DEM.TESTEVENTTRIGGER for Power Adjustment Test Event",
10096
"Verify DUT responds w/ status SUCCESS(0x00)"),
10197
TestStep("16b", "TH reads from the DUT the PowerAdjustmentCapability",
@@ -104,13 +100,12 @@ def steps_TC_DEM_2_10(self) -> list[TestStep]:
104100
"Verify DUT responds w/ status SUCCESS(0x00)"),
105101
TestStep("18", "Wait 12 seconds"),
106102
TestStep("18a", "TH counts all report transactions with an attribute report for the PowerAdjustmentCapability attribute",
107-
"TH verifies that numberOfReportsReceived \<= 2"),
103+
"TH verifies that numberOfReportsReceived <= 2"),
108104
TestStep("19", "TH resets all accumulated report counts, then TH sends command CancelPowerAdjustment",
109105
"Verify DUT responds w/ status SUCCESS(0x00)"),
110106
TestStep("20", "Wait 5 seconds"),
111107
TestStep("20a", "TH counts all report transactions with an attribute report for the PowerAdjustmentCapability attribute",
112108
"TH verifies that numberOfReportsReceived >=1"),
113-
114109
TestStep("21", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.DEM.TESTEVENTTRIGGER for Power Adjustment Test Event Clear",
115110
"Verify DUT responds w/ status SUCCESS(0x00)"),
116111
TestStep("22", "Cancel the subscription to the Device Energy Management cluster",

0 commit comments

Comments
 (0)