Skip to content

Commit

Permalink
Autogen'd the TestSteps from latest test plan
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesharrow committed Aug 29, 2024
1 parent 4307db7 commit 50085be
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions src/python_testing/TC_DEM_2_10.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def steps_TC_DEM_2_10(self) -> list[TestStep]:
"""Execute the test steps."""
steps = [
TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"),
TestStep("2", "TH reads from the DUT the FeatureMap attribute",
TestStep("2", "TH reads from the DUT the FeatureMap",
"Verify that the DUT response contains the FeatureMap attribute. Store the value as FeatureMap."),
TestStep("3", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster",
"Value has to be 1 (True)"),
Expand All @@ -72,30 +72,26 @@ def steps_TC_DEM_2_10(self) -> list[TestStep]:
"Verify DUT responds w/ status SUCCESS(0x00)"),
TestStep("5a", "TH reads from the DUT the OptOutState",
"Value has to be 0x00 (NoOptOut)"),
TestStep("6", "If {PICS_S_FA} {featIsNotSupported} skip to step 14",
"Value has to be 0x00 (NoOptOut)"),

TestStep("6", "If ForecastAdjustment feature is not supported on the cluster skip steps 7 to 14"),
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",
"Verify DUT responds w/ status SUCCESS(0x00)"),
TestStep("7a", "TH reads from the DUT the ESAState",
"Value has to be 0x01 (Online)"),
TestStep("8", "Reset all accumulated report counts, then wait 12 seconds"),
TestStep("9", "TH counts all report transactions with an attribute report for the Forecast attribute",
"TH verifies that numberOfReportsReceived \<= 2"),
"TH verifies that numberOfReportsReceived <= 2"),
TestStep("10", "TH reads from the DUT the Forecast",
"Value has to include slots[0].MinDurationAdjustment, slots[0].MaxDurationAdjustment"),
TestStep("11", "TH sends command ModifyForecastRequest... TODO",
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",
"Verify DUT responds w/ status SUCCESS(0x00)"),
TestStep("12", "TH resets all accumulated report counts, then TH sends command CancelRequest",
"Verify DUT responds w/ status SUCCESS(0x00)"),

TestStep("12", "TH resets all accumulated report counts, then TH sends command CancelRequest//// TODO"),

TestStep("13", "Wait 5 seconds"),

TestStep("13a", "TH counts all report transactions with an attribute report for the Forecast attribute_",
"TH verifies that numberOfReportsReceived >= 1 and Value has to include ForecastUpdateReason=InternalOptimization in the last attribute report received."),

TestStep("14", "Clear forecast trigger --- TODO"),
TestStep("15", "If {PICS_S_PA} {featIsNotSupported} skip to step 22 - TODO", ""),
TestStep("13a", "TH counts all report transactions with an attribute report for the Forecast attribute",
"TH verifies that numberOfReportsReceived >= 1"),
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",
"Verify DUT responds w/ status SUCCESS(0x00)"),
TestStep("15", "If PowerAdjustment feature is not supported on the cluster skip steps 16 to 21"),
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",
"Verify DUT responds w/ status SUCCESS(0x00)"),
TestStep("16b", "TH reads from the DUT the PowerAdjustmentCapability",
Expand All @@ -104,13 +100,12 @@ def steps_TC_DEM_2_10(self) -> list[TestStep]:
"Verify DUT responds w/ status SUCCESS(0x00)"),
TestStep("18", "Wait 12 seconds"),
TestStep("18a", "TH counts all report transactions with an attribute report for the PowerAdjustmentCapability attribute",
"TH verifies that numberOfReportsReceived \<= 2"),
"TH verifies that numberOfReportsReceived <= 2"),
TestStep("19", "TH resets all accumulated report counts, then TH sends command CancelPowerAdjustment",
"Verify DUT responds w/ status SUCCESS(0x00)"),
TestStep("20", "Wait 5 seconds"),
TestStep("20a", "TH counts all report transactions with an attribute report for the PowerAdjustmentCapability attribute",
"TH verifies that numberOfReportsReceived >=1"),

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",
"Verify DUT responds w/ status SUCCESS(0x00)"),
TestStep("22", "Cancel the subscription to the Device Energy Management cluster",
Expand Down

0 comments on commit 50085be

Please sign in to comment.