Tidy-up of the Energy Management related test cases from 1.3 which now use the 3rd arg of TestStep to split the verification step into a separate string. Helps with readability and PEP8 long line warnings. (#34243)
diff --git a/src/python_testing/TC_EEM_2_1.py b/src/python_testing/TC_EEM_2_1.py
index 51e01a1..1e975a8 100644
--- a/src/python_testing/TC_EEM_2_1.py
+++ b/src/python_testing/TC_EEM_2_1.py
@@ -44,13 +44,20 @@
def steps_TC_EEM_2_1(self) -> list[TestStep]:
steps = [
- TestStep("1", "Commissioning, already done", is_commissioning=True),
- TestStep("2", "TH reads Accuracy attribute. Verify that the DUT response contains a MeasurementAccuracyStruct value."),
- TestStep("3", "TH reads CumulativeEnergyImported attribute. Verify that the DUT response contains either null or an EnergyMeasurementStruct value."),
- TestStep("4", "TH reads CumulativeEnergyExported attribute. Verify that the DUT response contains either null or an EnergyMeasurementStruct value."),
- TestStep("5", "TH reads PeriodicEnergyImported attribute. Verify that the DUT response contains either null or an EnergyMeasurementStruct value."),
- TestStep("6", "TH reads PeriodicEnergyExported attribute. Verify that the DUT response contains either null or an EnergyMeasurementStruct value."),
- TestStep("7", "TH reads CumulativeEnergyReset attribute. Verify that the DUT response contains either null or an CumulativeEnergyResetStruct value."),
+ TestStep("1", "Commissioning, already done",
+ is_commissioning=True),
+ TestStep("2", "TH reads Accuracy attribute",
+ "Verify that the DUT response contains a MeasurementAccuracyStruct value."),
+ TestStep("3", "TH reads CumulativeEnergyImported attribute",
+ "Verify that the DUT response contains either null or an EnergyMeasurementStruct value."),
+ TestStep("4", "TH reads CumulativeEnergyExported attribute",
+ "Verify that the DUT response contains either null or an EnergyMeasurementStruct value."),
+ TestStep("5", "TH reads PeriodicEnergyImported attribute",
+ "Verify that the DUT response contains either null or an EnergyMeasurementStruct value."),
+ TestStep("6", "TH reads PeriodicEnergyExported attribute",
+ "Verify that the DUT response contains either null or an EnergyMeasurementStruct value."),
+ TestStep("7", "TH reads CumulativeEnergyReset attribute",
+ "Verify that the DUT response contains either null or an CumulativeEnergyResetStruct value."),
]
return steps
@@ -64,29 +71,34 @@
self.step("2")
accuracy = await self.read_eem_attribute_expect_success("Accuracy")
logger.info(f"Rx'd Accuracy: {accuracy}")
- asserts.assert_not_equal(accuracy, NullValue, "Accuracy is not allowed to be null")
+ asserts.assert_not_equal(
+ accuracy, NullValue, "Accuracy is not allowed to be null")
asserts.assert_equal(accuracy.measurementType, Clusters.ElectricalEnergyMeasurement.Enums.MeasurementTypeEnum.kElectricalEnergy,
"Accuracy measurementType must be ElectricalEnergy")
self.step("3")
if self.pics_guard(self.check_pics("EEM.S.A0001")):
cumulativeEnergyImported = await self.read_eem_attribute_expect_success("CumulativeEnergyImported")
- logger.info(f"Rx'd CumulativeEnergyImported: {cumulativeEnergyImported}")
+ logger.info(
+ f"Rx'd CumulativeEnergyImported: {cumulativeEnergyImported}")
self.step("4")
if self.pics_guard(self.check_pics("EEM.S.A0002")):
cumulativeEnergyExported = await self.read_eem_attribute_expect_success("CumulativeEnergyExported")
- logger.info(f"Rx'd CumulativeEnergyExported: {cumulativeEnergyExported}")
+ logger.info(
+ f"Rx'd CumulativeEnergyExported: {cumulativeEnergyExported}")
self.step("5")
if self.pics_guard(self.check_pics("EEM.S.A0003")):
periodicEnergyImported = await self.read_eem_attribute_expect_success("PeriodicEnergyImported")
- logger.info(f"Rx'd PeriodicEnergyImported: {periodicEnergyImported}")
+ logger.info(
+ f"Rx'd PeriodicEnergyImported: {periodicEnergyImported}")
self.step("6")
if self.pics_guard(self.check_pics("EEM.S.A0004")):
periodicEnergyExported = await self.read_eem_attribute_expect_success("PeriodicEnergyExported")
- logger.info(f"Rx'd PeriodicEnergyExported: {periodicEnergyExported}")
+ logger.info(
+ f"Rx'd PeriodicEnergyExported: {periodicEnergyExported}")
self.step("7")
if self.pics_guard(self.check_pics("EEM.S.A0005")):
diff --git a/src/python_testing/TC_EEM_2_2.py b/src/python_testing/TC_EEM_2_2.py
index 6571b80..2aef296 100644
--- a/src/python_testing/TC_EEM_2_2.py
+++ b/src/python_testing/TC_EEM_2_2.py
@@ -40,13 +40,17 @@
def steps_TC_EEM_2_2(self) -> list[TestStep]:
steps = [
- TestStep("1", "Commissioning, already done", is_commissioning=True),
- TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster. Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"),
+ TestStep("1", "Commissioning, already done",
+ is_commissioning=True),
+ TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster",
+ "Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"),
TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEM.TEST_EVENT_TRIGGER for Start Fake Load Test 1kW Event"),
TestStep("4", "Wait 3 seconds"),
- TestStep("4a", "TH reads from the DUT the CumulativeEnergyImported attribute. Verify the read is successful and note the value read."),
+ TestStep("4a", "TH reads from the DUT the CumulativeEnergyImported attribute",
+ "Verify the read is successful and note the value read."),
TestStep("5", "Wait 3 seconds"),
- TestStep("5a", "TH reads from the DUT the CumulativeEnergyImported attribute. Verify the read is successful and that the value is greater than the value measured in step 4a."),
+ TestStep("5a", "TH reads from the DUT the CumulativeEnergyImported attribute",
+ "Verify the read is successful and that the value is greater than the value measured in step 4a."),
TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEM.TEST_EVENT_TRIGGER for Stop Fake Readings Test Event."),
]
diff --git a/src/python_testing/TC_EEM_2_3.py b/src/python_testing/TC_EEM_2_3.py
index 7842f46..b9df334 100644
--- a/src/python_testing/TC_EEM_2_3.py
+++ b/src/python_testing/TC_EEM_2_3.py
@@ -40,13 +40,17 @@
def steps_TC_EEM_2_3(self) -> list[TestStep]:
steps = [
- TestStep("1", "Commissioning, already done", is_commissioning=True),
- TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster. Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"),
+ TestStep("1", "Commissioning, already done",
+ is_commissioning=True),
+ TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster",
+ "Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"),
TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEM.TEST_EVENT_TRIGGER for Start Fake Generator Test 3kW Event"),
TestStep("4", "Wait 6 seconds"),
- TestStep("4a", "TH reads from the DUT the CumulativeEnergyExported attribute. Verify the read is successful and note the value read."),
+ TestStep("4a", "TH reads from the DUT the CumulativeEnergyExported attribute",
+ "Verify the read is successful and note the value read."),
TestStep("5", "Wait 6 seconds"),
- TestStep("5a", "TH reads from the DUT the CumulativeEnergyExported attribute. Verify the read is successful and that the value is greater than the value measured in step 4a."),
+ TestStep("5a", "TH reads from the DUT the CumulativeEnergyExported attribute",
+ "Verify the read is successful and that the value is greater than the value measured in step 4a."),
TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEM.TEST_EVENT_TRIGGER for Stop Fake Readings Test Event."),
]
diff --git a/src/python_testing/TC_EEM_2_4.py b/src/python_testing/TC_EEM_2_4.py
index 2cf3b34..5a77885 100644
--- a/src/python_testing/TC_EEM_2_4.py
+++ b/src/python_testing/TC_EEM_2_4.py
@@ -40,13 +40,17 @@
def steps_TC_EEM_2_4(self) -> list[TestStep]:
steps = [
- TestStep("1", "Commissioning, already done", is_commissioning=True),
- TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster. Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"),
+ TestStep("1", "Commissioning, already done",
+ is_commissioning=True),
+ TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster",
+ "Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"),
TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEM.TEST_EVENT_TRIGGER for Start Fake Load Test 1kW Event"),
TestStep("4", "Wait 3 seconds"),
- TestStep("4a", "TH reads from the DUT the PeriodicEnergyImported attribute. Verify the read is successful and note the value read."),
+ TestStep("4a", "TH reads from the DUT the PeriodicEnergyImported attribute",
+ "Verify the read is successful and note the value read."),
TestStep("5", "Wait 3 seconds"),
- TestStep("5a", "TH reads from the DUT the PeriodicEnergyImported attribute. Verify the read is successful and that the value read has to be different from value measure in step 4a."),
+ TestStep("5a", "TH reads from the DUT the PeriodicEnergyImported attribute",
+ "Verify the read is successful and that the value read has to be different from value measure in step 4a."),
TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEM.TEST_EVENT_TRIGGER for Stop Fake Readings Test Event."),
]
diff --git a/src/python_testing/TC_EEM_2_5.py b/src/python_testing/TC_EEM_2_5.py
index 6a45707..239317c 100644
--- a/src/python_testing/TC_EEM_2_5.py
+++ b/src/python_testing/TC_EEM_2_5.py
@@ -40,13 +40,17 @@
def steps_TC_EEM_2_5(self) -> list[TestStep]:
steps = [
- TestStep("1", "Commissioning, already done", is_commissioning=True),
- TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster. Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"),
+ TestStep("1", "Commissioning, already done",
+ is_commissioning=True),
+ TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster",
+ "Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"),
TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEM.TEST_EVENT_TRIGGER for Start Fake Generator Test 3kW Event"),
TestStep("4", "Wait 6 seconds"),
- TestStep("4a", "TH reads from the DUT the PeriodicEnergyExported attribute. Verify the read is successful and note the value read."),
+ TestStep("4a", "TH reads from the DUT the PeriodicEnergyExported attribute",
+ "Verify the read is successful and note the value read."),
TestStep("5", "Wait 6 seconds"),
- TestStep("5a", "TH reads from the DUT the PeriodicEnergyExported attribute. Verify the read is successful and that the value read has to be different from value measure in step 4a."),
+ TestStep("5a", "TH reads from the DUT the PeriodicEnergyExported attribute",
+ "Verify the read is successful and that the value read has to be different from value measure in step 4a."),
TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEM.TEST_EVENT_TRIGGER for Stop Fake Readings Test Event."),
]
diff --git a/src/python_testing/TC_EEVSE_2_2.py b/src/python_testing/TC_EEVSE_2_2.py
index 4fdf12c..6c41f4e6 100644
--- a/src/python_testing/TC_EEVSE_2_2.py
+++ b/src/python_testing/TC_EEVSE_2_2.py
@@ -47,51 +47,92 @@
def steps_TC_EEVSE_2_2(self) -> list[TestStep]:
steps = [
- TestStep("1", "Commissioning, already done", is_commissioning=True),
- TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster. Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"),
+ TestStep("1", "Commissioning, already done",
+ is_commissioning=True),
+ TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster.",
+ "Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"),
TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for Basic Functionality Test Event"),
- TestStep("3a", "After a few seconds TH reads from the DUT the State attribute. Verify value is 0x00 (NotPluggedIn)"),
- TestStep("3b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x00 (Disabled)"),
- TestStep("3c", "TH reads from the DUT the FaultState attribute. Verify value is 0x00 (NoError)"),
- TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event. Verify Event EEVSE.S.E00(EVConnected) sent"),
- TestStep("4a", "TH reads from the DUT the State attribute. Verify value is 0x01 (PluggedInNoDemand)"),
- TestStep("4b", "TH reads from the DUT the SessionID attribute. Value is noted for later"),
+ TestStep("3a", "After a few seconds TH reads from the DUT the State attribute.",
+ "Verify value is 0x00 (NotPluggedIn)"),
+ TestStep("3b", "TH reads from the DUT the SupplyState attribute.",
+ "Verify value is 0x00 (Disabled)"),
+ TestStep("3c", "TH reads from the DUT the FaultState attribute.",
+ "Verify value is 0x00 (NoError)"),
+ TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event.",
+ "Verify Event EEVSE.S.E00(EVConnected) sent"),
+ TestStep("4a", "TH reads from the DUT the State attribute.",
+ "Verify value is 0x01 (PluggedInNoDemand)"),
+ TestStep("4b",
+ "TH reads from the DUT the SessionID attribute. Value is noted for later"),
TestStep("5", "TH sends command EnableCharging with ChargingEnabledUntil=2 minutes in the future, minimumChargeCurrent=6000, maximumChargeCurrent=60000"),
- TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event. Verify Event EEVSE.S.E02(EnergyTransferStarted) sent."),
- TestStep("6a", "TH reads from the DUT the State attribute. Verify value is 0x3 (PluggedInCharging)"),
- TestStep("6b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x1 (ChargingEnabled)"),
- TestStep("6c", "TH reads from the DUT the ChargingEnabledUntil attribute. Verify value is the commanded value"),
- TestStep("6d", "TH reads from the DUT the MinimumChargeCurrent attribute. Verify value is the commanded value (6000)"),
- TestStep("6e", "TH reads from the DUT the MaximumChargeCurrent attribute. Verify value is the min(command value (60000), CircuitCapacity)"),
- TestStep("7", "Wait 2 minutes. Verify Event EEVSE.S.E03(EnergyTransferStopped) sent with reason EvseStopped"),
- TestStep("7a", "TH reads from the DUT the State attribute. Verify value is 0x02 (PluggedInDemand)"),
- TestStep("7b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x00 (Disabled)"),
+ TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event.",
+ "Verify Event EEVSE.S.E02(EnergyTransferStarted) sent."),
+ TestStep("6a", "TH reads from the DUT the State attribute.",
+ "Verify value is 0x3 (PluggedInCharging)"),
+ TestStep("6b", "TH reads from the DUT the SupplyState attribute.",
+ "Verify value is 0x1 (ChargingEnabled)"),
+ TestStep("6c", "TH reads from the DUT the ChargingEnabledUntil attribute.",
+ "Verify value is the commanded value"),
+ TestStep("6d", "TH reads from the DUT the MinimumChargeCurrent attribute.",
+ "Verify value is the commanded value (6000)"),
+ TestStep("6e", "TH reads from the DUT the MaximumChargeCurrent attribute.",
+ "Verify value is the min(command value (60000), CircuitCapacity)"),
+ TestStep("7", "Wait 2 minutes.",
+ "Verify Event EEVSE.S.E03(EnergyTransferStopped) sent with reason EvseStopped"),
+ TestStep("7a", "TH reads from the DUT the State attribute.",
+ "Verify value is 0x02 (PluggedInDemand)"),
+ TestStep("7b", "TH reads from the DUT the SupplyState attribute.",
+ "Verify value is 0x00 (Disabled)"),
TestStep("8", "TH sends command EnableCharging with ChargingEnabledUntil=NULL, minimumChargeCurrent = 6000, maximumChargeCurrent=12000"),
- TestStep("8a", "TH reads from the DUT the State attribute. Verify value is 0x03 (PluggedInCharging)"),
- TestStep("8b", "TH reads from the DUT the SupplyState attribute. Verify value is 1 (ChargingEnabled)"),
- TestStep("8c", "TH reads from the DUT the ChargingEnabledUntil attribute. Verify value is the commanded value (NULL)"),
- TestStep("8d", "TH reads from the DUT the MinimumChargeCurrent attribute. Verify value is the commanded value (6000)"),
- TestStep("8e", "TH reads from the DUT the MaximumChargeCurrent attribute. Verify value is the MIN(command value (60000), CircuitCapacity)"),
- TestStep("9", "If the optional attribute is supported TH writes to the DUT UserMaximumChargeCurrent=6000"),
- TestStep("9a", "After a few seconds TH reads from the DUT the MaximumChargeCurrent. Verify value is UserMaximumChargeCurrent value (6000)"),
- TestStep("10", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event Clear. Verify Event EEVSE.S.E03(EnergyTransferStopped) sent with reason EvStopped"),
- TestStep("10a", "TH reads from the DUT the State attribute. Verify value is 0x01 (PluggedInNoDemand)"),
- TestStep("11", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event. Verify Event EEVSE.S.E02(EnergyTransferStarted) sent."),
- TestStep("11a", "TH reads from the DUT the State attribute. Verify value is 0x03 (PluggedInCharging)"),
- TestStep("12", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event Clear. Verify Event EEVSE.S.E03(EnergyTransferStopped) sent with reason EvStopped"),
- TestStep("12a", "TH reads from the DUT the State attribute. Verify value is 0x01 (PluggedInNoDemand)"),
- TestStep("13", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event Clear. Verify Event EEVSE.S.E01(EVNotDetected) sent"),
- TestStep("13a", "TH reads from the DUT the State attribute. Verify value is 0x00 (NotPluggedIn)"),
- TestStep("13b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x01 (ChargingEnabled)"),
- TestStep("13c", "TH reads from the DUT the SessionID attribute. Verify value is the same value noted in 4b"),
- TestStep("13d", "TH reads from the DUT the SessionDuration attribute. Verify value is greater than 120 (and match the time taken for the tests from step 4 to step 13)"),
- TestStep("14", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event. Verify Event EEVSE.S.E00(EVConnected) sent"),
- TestStep("14a", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event. Verify Event EEVSE.S.E02(EnergyTransferStarted) sent."),
- TestStep("14b", "TH reads from the DUT the SessionID attribute. Verify value is 1 more than the value noted in 4b"),
- TestStep("15", "TH sends command Disable. Verify Event EEVSE.S.E03(EnergyTransferStopped) sent with reason EvseStopped"),
- TestStep("15a", "TH reads from the DUT the SupplyState attribute. Verify value is 0x00 (Disabled)"),
+ TestStep("8a", "TH reads from the DUT the State attribute.",
+ "Verify value is 0x03 (PluggedInCharging)"),
+ TestStep("8b", "TH reads from the DUT the SupplyState attribute.",
+ "Verify value is 1 (ChargingEnabled)"),
+ TestStep("8c", "TH reads from the DUT the ChargingEnabledUntil attribute",
+ "Verify value is the commanded value (NULL)"),
+ TestStep("8d", "TH reads from the DUT the MinimumChargeCurrent attribute",
+ "Verify value is the commanded value (6000)"),
+ TestStep("8e", "TH reads from the DUT the MaximumChargeCurrent attribute",
+ "Verify value is the MIN(command value (60000), CircuitCapacity)"),
+ TestStep("9",
+ "If the optional attribute is supported TH writes to the DUT UserMaximumChargeCurrent=6000"),
+ TestStep("9a", "After a few seconds TH reads from the DUT the MaximumChargeCurrent",
+ "Verify value is UserMaximumChargeCurrent value (6000)"),
+ TestStep("10", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event Clear",
+ "Verify Event EEVSE.S.E03(EnergyTransferStopped) sent with reason EvStopped"),
+ TestStep("10a", "TH reads from the DUT the State attribute",
+ "Verify value is 0x01 (PluggedInNoDemand)"),
+ TestStep("11", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event",
+ "Verify Event EEVSE.S.E02(EnergyTransferStarted) sent."),
+ TestStep("11a", "TH reads from the DUT the State attribute",
+ "Verify value is 0x03 (PluggedInCharging)"),
+ TestStep("12", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event Clear",
+ "Verify Event EEVSE.S.E03(EnergyTransferStopped) sent with reason EvStopped"),
+ TestStep("12a", "TH reads from the DUT the State attribute",
+ "Verify value is 0x01 (PluggedInNoDemand)"),
+ TestStep("13", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event Clear",
+ "Verify Event EEVSE.S.E01(EVNotDetected) sent"),
+ TestStep("13a", "TH reads from the DUT the State attribute",
+ "Verify value is 0x00 (NotPluggedIn)"),
+ TestStep("13b", "TH reads from the DUT the SupplyState attribute",
+ "Verify value is 0x01 (ChargingEnabled)"),
+ TestStep("13c", "TH reads from the DUT the SessionID attribute",
+ "Verify value is the same value noted in 4b"),
+ TestStep("13d", "TH reads from the DUT the SessionDuration attribute",
+ "Verify value is greater than 120 (and match the time taken for the tests from step 4 to step 13)"),
+ TestStep("14", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event",
+ "Verify Event EEVSE.S.E00(EVConnected) sent"),
+ TestStep("14a", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event",
+ "Verify Event EEVSE.S.E02(EnergyTransferStarted) sent."),
+ TestStep("14b", "TH reads from the DUT the SessionID attribute",
+ "Verify value is 1 more than the value noted in 4b"),
+ TestStep("15", "TH sends command Disable",
+ "Verify Event EEVSE.S.E03(EnergyTransferStopped) sent with reason EvseStopped"),
+ TestStep("15a", "TH reads from the DUT the SupplyState attribute",
+ "Verify value is 0x00 (Disabled)"),
TestStep("16", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event Clear."),
- TestStep("17", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event Clear. Verify Event EEVSE.S.E01(EVNotDetected) sent"),
+ TestStep("17", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event Clear",
+ "Verify Event EEVSE.S.E01(EVNotDetected) sent"),
TestStep("18", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for Basic Functionality Test Event Clear."),
]
@@ -129,7 +170,8 @@
self.step("4")
await self.send_test_event_trigger_pluggedin()
- event_data = events_callback.wait_for_event_report(Clusters.EnergyEvse.Events.EVConnected)
+ event_data = events_callback.wait_for_event_report(
+ Clusters.EnergyEvse.Events.EVConnected)
self.step("4a")
await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kPluggedInNoDemand)
@@ -145,15 +187,18 @@
max_charge_current = 60000
expected_state = Clusters.EnergyEvse.Enums.StateEnum.kPluggedInCharging
# get epoch time for ChargeUntil variable (2 minutes from now)
- utc_time_charging_end = datetime.now(tz=timezone.utc) + timedelta(seconds=charging_duration)
+ utc_time_charging_end = datetime.now(
+ tz=timezone.utc) + timedelta(seconds=charging_duration)
# Matter epoch is 0 hours, 0 minutes, 0 seconds on Jan 1, 2000 UTC
- epoch_time = int((utc_time_charging_end - datetime(2000, 1, 1, 0, 0, 0, 0, timezone.utc)).total_seconds())
+ epoch_time = int((utc_time_charging_end - datetime(2000,
+ 1, 1, 0, 0, 0, 0, timezone.utc)).total_seconds())
await self.send_enable_charge_command(endpoint=1, charge_until=epoch_time, min_charge=min_charge_current, max_charge=max_charge_current)
self.step("6")
await self.send_test_event_trigger_charge_demand()
- event_data = events_callback.wait_for_event_report(Clusters.EnergyEvse.Events.EnergyTransferStarted)
+ event_data = events_callback.wait_for_event_report(
+ Clusters.EnergyEvse.Events.EnergyTransferStarted)
self.step("6a")
await self.check_evse_attribute("State", expected_state)
@@ -172,15 +217,18 @@
expected_max_charge = min(max_charge_current, circuit_capacity)
await self.check_evse_attribute("MaximumChargeCurrent", expected_max_charge)
- self.validate_energy_transfer_started_event(event_data, session_id, expected_state, expected_max_charge)
+ self.validate_energy_transfer_started_event(
+ event_data, session_id, expected_state, expected_max_charge)
self.step("7")
# Sleep for the charging duration plus a couple of seconds to check it has stopped
time.sleep(charging_duration + 2)
# check EnergyTransferredStoped (EvseStopped)
- event_data = events_callback.wait_for_event_report(Clusters.EnergyEvse.Events.EnergyTransferStopped)
+ event_data = events_callback.wait_for_event_report(
+ Clusters.EnergyEvse.Events.EnergyTransferStopped)
expected_reason = Clusters.EnergyEvse.Enums.EnergyTransferStoppedReasonEnum.kEVSEStopped
- self.validate_energy_transfer_stopped_event(event_data, session_id, expected_state, expected_reason)
+ self.validate_energy_transfer_stopped_event(
+ event_data, session_id, expected_state, expected_reason)
self.step("7a")
await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kPluggedInDemand)
@@ -194,7 +242,8 @@
max_charge_current = 12000
await self.send_enable_charge_command(charge_until=charge_until, min_charge=min_charge_current, max_charge=max_charge_current)
- event_data = events_callback.wait_for_event_report(Clusters.EnergyEvse.Events.EnergyTransferStarted)
+ event_data = events_callback.wait_for_event_report(
+ Clusters.EnergyEvse.Events.EnergyTransferStarted)
self.step("8a")
await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kPluggedInCharging)
@@ -214,7 +263,8 @@
await self.check_evse_attribute("MaximumChargeCurrent", expected_max_charge)
# from step 8 above - validate event
- self.validate_energy_transfer_started_event(event_data, session_id, expected_state, expected_max_charge)
+ self.validate_energy_transfer_started_event(
+ event_data, session_id, expected_state, expected_max_charge)
self.step("9")
# This will only work if the optional UserMaximumChargeCurrent attribute is supported
@@ -227,16 +277,20 @@
self.step("9a")
time.sleep(3)
- expected_max_charge = min(user_max_charge_current, circuit_capacity)
+ expected_max_charge = min(
+ user_max_charge_current, circuit_capacity)
await self.check_evse_attribute("MaximumChargeCurrent", expected_max_charge)
else:
- logging.info("UserMaximumChargeCurrent is NOT supported... skipping.")
+ logging.info(
+ "UserMaximumChargeCurrent is NOT supported... skipping.")
self.step("10")
await self.send_test_event_trigger_charge_demand_clear()
- event_data = events_callback.wait_for_event_report(Clusters.EnergyEvse.Events.EnergyTransferStopped)
+ event_data = events_callback.wait_for_event_report(
+ Clusters.EnergyEvse.Events.EnergyTransferStopped)
expected_reason = Clusters.EnergyEvse.Enums.EnergyTransferStoppedReasonEnum.kEVStopped
- self.validate_energy_transfer_stopped_event(event_data, session_id, expected_state, expected_reason)
+ self.validate_energy_transfer_stopped_event(
+ event_data, session_id, expected_state, expected_reason)
self.step("10a")
await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kPluggedInNoDemand)
@@ -245,26 +299,32 @@
await self.send_test_event_trigger_charge_demand()
# Check we get EnergyTransferStarted again
await self.send_enable_charge_command(charge_until=charge_until, min_charge=min_charge_current, max_charge=max_charge_current)
- event_data = events_callback.wait_for_event_report(Clusters.EnergyEvse.Events.EnergyTransferStarted)
- self.validate_energy_transfer_started_event(event_data, session_id, expected_state, expected_max_charge)
+ event_data = events_callback.wait_for_event_report(
+ Clusters.EnergyEvse.Events.EnergyTransferStarted)
+ self.validate_energy_transfer_started_event(
+ event_data, session_id, expected_state, expected_max_charge)
self.step("11a")
await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kPluggedInCharging)
self.step("12")
await self.send_test_event_trigger_charge_demand_clear()
- event_data = events_callback.wait_for_event_report(Clusters.EnergyEvse.Events.EnergyTransferStopped)
+ event_data = events_callback.wait_for_event_report(
+ Clusters.EnergyEvse.Events.EnergyTransferStopped)
expected_reason = Clusters.EnergyEvse.Enums.EnergyTransferStoppedReasonEnum.kEVStopped
- self.validate_energy_transfer_stopped_event(event_data, session_id, expected_state, expected_reason)
+ self.validate_energy_transfer_stopped_event(
+ event_data, session_id, expected_state, expected_reason)
self.step("12a")
await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kPluggedInNoDemand)
self.step("13")
await self.send_test_event_trigger_pluggedin_clear()
- event_data = events_callback.wait_for_event_report(Clusters.EnergyEvse.Events.EVNotDetected)
+ event_data = events_callback.wait_for_event_report(
+ Clusters.EnergyEvse.Events.EVNotDetected)
expected_state = Clusters.EnergyEvse.Enums.StateEnum.kPluggedInNoDemand
- self.validate_ev_not_detected_event(event_data, session_id, expected_state, expected_duration=0, expected_charged=0)
+ self.validate_ev_not_detected_event(
+ event_data, session_id, expected_state, expected_duration=0, expected_charged=0)
self.step("13a")
await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kNotPluggedIn)
@@ -286,24 +346,31 @@
session_id = session_id + 1
# Check we get a new EVConnected event with updated session ID
- event_data = events_callback.wait_for_event_report(Clusters.EnergyEvse.Events.EVConnected)
+ event_data = events_callback.wait_for_event_report(
+ Clusters.EnergyEvse.Events.EVConnected)
self.validate_ev_connected_event(event_data, session_id)
self.step("14a")
await self.send_test_event_trigger_charge_demand()
- expected_state = Clusters.EnergyEvse.Enums.StateEnum.kPluggedInCharging # This is the value at the event time
- event_data = events_callback.wait_for_event_report(Clusters.EnergyEvse.Events.EnergyTransferStarted)
- self.validate_energy_transfer_started_event(event_data, session_id, expected_state, expected_max_charge)
+ # This is the value at the event time
+ expected_state = Clusters.EnergyEvse.Enums.StateEnum.kPluggedInCharging
+ event_data = events_callback.wait_for_event_report(
+ Clusters.EnergyEvse.Events.EnergyTransferStarted)
+ self.validate_energy_transfer_started_event(
+ event_data, session_id, expected_state, expected_max_charge)
self.step("14b")
await self.check_evse_attribute("SessionID", session_id)
self.step("15")
await self.send_disable_command()
- expected_state = Clusters.EnergyEvse.Enums.StateEnum.kPluggedInCharging # This is the value prior to stopping
- event_data = events_callback.wait_for_event_report(Clusters.EnergyEvse.Events.EnergyTransferStopped)
+ # This is the value prior to stopping
+ expected_state = Clusters.EnergyEvse.Enums.StateEnum.kPluggedInCharging
+ event_data = events_callback.wait_for_event_report(
+ Clusters.EnergyEvse.Events.EnergyTransferStopped)
expected_reason = Clusters.EnergyEvse.Enums.EnergyTransferStoppedReasonEnum.kEVSEStopped
- self.validate_energy_transfer_stopped_event(event_data, session_id, expected_state, expected_reason)
+ self.validate_energy_transfer_stopped_event(
+ event_data, session_id, expected_state, expected_reason)
self.step("15a")
await self.check_evse_attribute("SupplyState", Clusters.EnergyEvse.Enums.SupplyStateEnum.kDisabled)
@@ -313,9 +380,11 @@
self.step("17")
await self.send_test_event_trigger_pluggedin_clear()
- event_data = events_callback.wait_for_event_report(Clusters.EnergyEvse.Events.EVNotDetected)
+ event_data = events_callback.wait_for_event_report(
+ Clusters.EnergyEvse.Events.EVNotDetected)
expected_state = Clusters.EnergyEvse.Enums.StateEnum.kPluggedInNoDemand
- self.validate_ev_not_detected_event(event_data, session_id, expected_state, expected_duration=0, expected_charged=0)
+ self.validate_ev_not_detected_event(
+ event_data, session_id, expected_state, expected_duration=0, expected_charged=0)
self.step("18")
await self.send_test_event_trigger_basic_clear()
diff --git a/src/python_testing/TC_EEVSE_2_4.py b/src/python_testing/TC_EEVSE_2_4.py
index f8d8827..b2618f4 100644
--- a/src/python_testing/TC_EEVSE_2_4.py
+++ b/src/python_testing/TC_EEVSE_2_4.py
@@ -45,30 +45,51 @@
def steps_TC_EEVSE_2_4(self) -> list[TestStep]:
steps = [
- TestStep("1", "Commissioning, already done", is_commissioning=True),
- TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster. Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"),
+ TestStep("1", "Commissioning, already done",
+ is_commissioning=True),
+ TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster",
+ "Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"),
TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for Basic Functionality Test Event"),
- TestStep("3a", "After a few seconds TH reads from the DUT the State attribute. Verify value is 0x00 (NotPluggedIn)"),
- TestStep("3b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x00 (Disabled)"),
- TestStep("3c", "TH reads from the DUT the FaultState attribute. Verify value is 0x00 (NoError)"),
- TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event. Verify Event EEVSE.S.E00(EVConnected) sent"),
- TestStep("4a", "TH reads from the DUT the State attribute. Verify value is 0x01 (PluggedInNoDemand)"),
- TestStep("4b", "TH reads from the DUT the SessionID attribute. Value is saved for later"),
+ TestStep("3a", "After a few seconds TH reads from the DUT the State attribute",
+ "Verify value is 0x00 (NotPluggedIn)"),
+ TestStep("3b", "TH reads from the DUT the SupplyState attribute",
+ "Verify value is 0x00 (Disabled)"),
+ TestStep("3c", "TH reads from the DUT the FaultState attribute",
+ "Verify value is 0x00 (NoError)"),
+ TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event",
+ "Verify Event EEVSE.S.E00(EVConnected) sent"),
+ TestStep("4a", "TH reads from the DUT the State attribute",
+ "Verify value is 0x01 (PluggedInNoDemand)"),
+ TestStep("4b",
+ "TH reads from the DUT the SessionID attribute. Value is saved for later"),
TestStep("5", "TH sends command EnableCharging with ChargingEnabledUntil=Null, minimumChargeCurrent=6000, maximumChargeCurrent=60000"),
- TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event. Verify Event EEVSE.S.E02(EnergyTransferStarted) sent."),
- TestStep("6a", "TH reads from the DUT the State attribute. Verify value is 0x3 (PluggedInCharging)"),
- TestStep("6b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x1 (ChargingEnabled)"),
- TestStep("7", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EVSE Ground Fault Test Event. Verify Event EEVSE.S.E04(Fault) sent with SessionID matching value in step 4b, FaultStatePreviousFaultState = 0x00 (NoError), FaultStateCurrentFaultState = 0x07 (GroundFault)"),
- TestStep("7a", "TH reads from the DUT the State attribute. Verify value is 0x6 (Fault)"),
- TestStep("7b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x4 (DisabledError)"),
- TestStep("8", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EVSE Over Temperature Fault Test Event. Verify Event EEVSE.S.E04(Fault) sent with SessionID matching value in step 4b, FaultStatePreviousFaultState = 0x07 (GroundFault), FaultStateCurrentFaultState = 0x0F (OverTemperature)"),
- TestStep("8a", "TH reads from the DUT the State attribute. Verify value is 0x6 (Fault)"),
- TestStep("8b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x4 (DisabledError)"),
- TestStep("9", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EVSE Fault Test Event Clear. Verify Event EEVSE.S.E04(Fault) sent with SessionID matching value in step 4b, FaultStatePreviousFaultState = 0x0F (OverTemperature), FaultStateCurrentFaultState = 0x00 (NoError)"),
- TestStep("9a", "TH reads from the DUT the State attribute. Verify value is 0x3 (PluggedInCharging)"),
- TestStep("9b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x1 (ChargingEnabled)"),
+ TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event",
+ "Verify Event EEVSE.S.E02(EnergyTransferStarted) sent."),
+ TestStep("6a", "TH reads from the DUT the State attribute",
+ "Verify value is 0x3 (PluggedInCharging)"),
+ TestStep("6b", "TH reads from the DUT the SupplyState attribute",
+ "Verify value is 0x1 (ChargingEnabled)"),
+ TestStep("7", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EVSE Ground Fault Test Event",
+ "Verify Event EEVSE.S.E04(Fault) sent with SessionID matching value in step 4b, FaultStatePreviousFaultState = 0x00 (NoError), FaultStateCurrentFaultState = 0x07 (GroundFault)"),
+ TestStep("7a", "TH reads from the DUT the State attribute",
+ "Verify value is 0x6 (Fault)"),
+ TestStep("7b", "TH reads from the DUT the SupplyState attribute",
+ "Verify value is 0x4 (DisabledError)"),
+ TestStep("8", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EVSE Over Temperature Fault Test Event",
+ "Verify Event EEVSE.S.E04(Fault) sent with SessionID matching value in step 4b, FaultStatePreviousFaultState = 0x07 (GroundFault), FaultStateCurrentFaultState = 0x0F (OverTemperature)"),
+ TestStep("8a", "TH reads from the DUT the State attribute",
+ "Verify value is 0x6 (Fault)"),
+ TestStep("8b", "TH reads from the DUT the SupplyState attribute",
+ "Verify value is 0x4 (DisabledError)"),
+ TestStep("9", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EVSE Fault Test Event Clear",
+ "Verify Event EEVSE.S.E04(Fault) sent with SessionID matching value in step 4b, FaultStatePreviousFaultState = 0x0F (OverTemperature), FaultStateCurrentFaultState = 0x00 (NoError)"),
+ TestStep("9a", "TH reads from the DUT the State attribute",
+ "Verify value is 0x3 (PluggedInCharging)"),
+ TestStep("9b", "TH reads from the DUT the SupplyState attribute",
+ "Verify value is 0x1 (ChargingEnabled)"),
TestStep("10", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event Clear."),
- TestStep("11", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event Clear. Verify Event EEVSE.S.E01(EVNotDetected) sent"),
+ TestStep("11", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event Clear",
+ "Verify Event EEVSE.S.E01(EVNotDetected) sent"),
TestStep("12", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for Basic Functionality Test Event Clear."),
]
@@ -105,7 +126,8 @@
self.step("4")
await self.send_test_event_trigger_pluggedin()
- event_data = events_callback.wait_for_event_report(Clusters.EnergyEvse.Events.EVConnected)
+ event_data = events_callback.wait_for_event_report(
+ Clusters.EnergyEvse.Events.EVConnected)
self.step("4a")
await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kPluggedInNoDemand)
@@ -123,7 +145,8 @@
self.step("6")
await self.send_test_event_trigger_charge_demand()
- event_data = events_callback.wait_for_event_report(Clusters.EnergyEvse.Events.EnergyTransferStarted)
+ event_data = events_callback.wait_for_event_report(
+ Clusters.EnergyEvse.Events.EnergyTransferStarted)
self.step("6a")
await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kPluggedInCharging)
@@ -133,11 +156,13 @@
self.step("7")
await self.send_test_event_trigger_evse_ground_fault()
- event_data = events_callback.wait_for_event_report(Clusters.EnergyEvse.Events.Fault)
+ event_data = events_callback.wait_for_event_report(
+ Clusters.EnergyEvse.Events.Fault)
expected_state = Clusters.EnergyEvse.Enums.StateEnum.kPluggedInCharging
previous_fault = Clusters.EnergyEvse.Enums.FaultStateEnum.kNoError
current_fault = Clusters.EnergyEvse.Enums.FaultStateEnum.kGroundFault
- self.validate_evse_fault_event(event_data, session_id, expected_state, previous_fault, current_fault)
+ self.validate_evse_fault_event(
+ event_data, session_id, expected_state, previous_fault, current_fault)
self.step("7a")
await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kFault)
@@ -147,11 +172,13 @@
self.step("8")
await self.send_test_event_trigger_evse_over_temperature_fault()
- event_data = events_callback.wait_for_event_report(Clusters.EnergyEvse.Events.Fault)
+ event_data = events_callback.wait_for_event_report(
+ Clusters.EnergyEvse.Events.Fault)
expected_state = Clusters.EnergyEvse.Enums.StateEnum.kFault
previous_fault = Clusters.EnergyEvse.Enums.FaultStateEnum.kGroundFault
current_fault = Clusters.EnergyEvse.Enums.FaultStateEnum.kOverTemperature
- self.validate_evse_fault_event(event_data, session_id, expected_state, previous_fault, current_fault)
+ self.validate_evse_fault_event(
+ event_data, session_id, expected_state, previous_fault, current_fault)
self.step("8a")
await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kFault)
@@ -161,11 +188,13 @@
self.step("9")
await self.send_test_event_trigger_evse_fault_clear()
- event_data = events_callback.wait_for_event_report(Clusters.EnergyEvse.Events.Fault)
+ event_data = events_callback.wait_for_event_report(
+ Clusters.EnergyEvse.Events.Fault)
expected_state = Clusters.EnergyEvse.Enums.StateEnum.kFault
previous_fault = Clusters.EnergyEvse.Enums.FaultStateEnum.kOverTemperature
current_fault = Clusters.EnergyEvse.Enums.FaultStateEnum.kNoError
- self.validate_evse_fault_event(event_data, session_id, expected_state, previous_fault, current_fault)
+ self.validate_evse_fault_event(
+ event_data, session_id, expected_state, previous_fault, current_fault)
self.step("9a")
await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kPluggedInCharging)
@@ -175,13 +204,16 @@
self.step("10")
await self.send_test_event_trigger_charge_demand_clear()
- event_data = events_callback.wait_for_event_report(Clusters.EnergyEvse.Events.EnergyTransferStopped)
+ event_data = events_callback.wait_for_event_report(
+ Clusters.EnergyEvse.Events.EnergyTransferStopped)
self.step("11")
await self.send_test_event_trigger_pluggedin_clear()
- event_data = events_callback.wait_for_event_report(Clusters.EnergyEvse.Events.EVNotDetected)
+ event_data = events_callback.wait_for_event_report(
+ Clusters.EnergyEvse.Events.EVNotDetected)
expected_state = Clusters.EnergyEvse.Enums.StateEnum.kPluggedInNoDemand
- self.validate_ev_not_detected_event(event_data, session_id, expected_state, expected_duration=0, expected_charged=0)
+ self.validate_ev_not_detected_event(
+ event_data, session_id, expected_state, expected_duration=0, expected_charged=0)
self.step("12")
await self.send_test_event_trigger_basic_clear()
diff --git a/src/python_testing/TC_EEVSE_2_5.py b/src/python_testing/TC_EEVSE_2_5.py
index 3fdb5f9..914a4a8 100644
--- a/src/python_testing/TC_EEVSE_2_5.py
+++ b/src/python_testing/TC_EEVSE_2_5.py
@@ -45,24 +45,38 @@
def steps_TC_EEVSE_2_5(self) -> list[TestStep]:
steps = [
- TestStep("1", "Commissioning, already done", is_commissioning=True),
- TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster. Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"),
+ TestStep("1", "Commissioning, already done",
+ is_commissioning=True),
+ TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster",
+ "Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"),
TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for Basic Functionality Test Event"),
- TestStep("3a", "TH reads from the DUT the State attribute. Verify value is 0x00 (NotPluggedIn)"),
- TestStep("3b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x00 (Disabled)"),
- TestStep("3c", "TH reads from the DUT the FaultState attribute. Verify value is 0x00 (NoError)"),
+ TestStep("3a", "TH reads from the DUT the State attribute",
+ "Verify value is 0x00 (NotPluggedIn)"),
+ TestStep("3b", "TH reads from the DUT the SupplyState attribute",
+ "Verify value is 0x00 (Disabled)"),
+ TestStep("3c", "TH reads from the DUT the FaultState attribute",
+ "Verify value is 0x00 (NoError)"),
TestStep("4", "TH sends command EnableCharging with ChargingEnabledUntil=Null, minimumChargeCurrent=6000, maximumChargeCurrent=60000"),
- TestStep("4a", "TH reads from the DUT the State attribute. Verify value is 0x00 (NotPluggedIn)"),
- TestStep("4b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x01 (ChargingEnabled)"),
- TestStep("5", "TH sends command StartDiagnostics. Verify that command is rejected with Failure"),
+ TestStep("4a", "TH reads from the DUT the State attribute",
+ "Verify value is 0x00 (NotPluggedIn)"),
+ TestStep("4b", "TH reads from the DUT the SupplyState attribute",
+ "Verify value is 0x01 (ChargingEnabled)"),
+ TestStep("5", "TH sends command StartDiagnostics",
+ "Verify that command is rejected with Failure"),
TestStep("6", "TH sends command Disable."),
- TestStep("6a", "TH reads from the DUT the State attribute. Verify value is 0x00 (NotPluggedIn)"),
- TestStep("6b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x00 (Disabled)"),
- TestStep("7", "TH sends command StartDiagnostics. Verify that command is accepted with Success"),
- TestStep("7a", "TH reads from the DUT the SupplyState attribute. Verify value is 0x04 (DisabledDiagnostics)"),
+ TestStep("6a", "TH reads from the DUT the State attribute",
+ "Verify value is 0x00 (NotPluggedIn)"),
+ TestStep("6b", "TH reads from the DUT the SupplyState attribute",
+ "Verify value is 0x00 (Disabled)"),
+ TestStep("7", "TH sends command StartDiagnostics",
+ "Verify that command is accepted with Success"),
+ TestStep("7a", "TH reads from the DUT the SupplyState attribute",
+ "Verify value is 0x04 (DisabledDiagnostics)"),
TestStep("8", "A few seconds later TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EVSE Diagnostics Complete Event"),
- TestStep("8a", "TH reads from the DUT the State attribute. Verify value is 0x00 (NotPluggedIn)"),
- TestStep("8b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x00 (Disabled)"),
+ TestStep("8a", "TH reads from the DUT the State attribute",
+ "Verify value is 0x00 (NotPluggedIn)"),
+ TestStep("8b", "TH reads from the DUT the SupplyState attribute",
+ "Verify value is 0x00 (Disabled)"),
TestStep("9", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for Basic Functionality Test Event Clear."),
]
diff --git a/src/python_testing/TC_EPM_2_1.py b/src/python_testing/TC_EPM_2_1.py
index 2c39fd9..c856fec 100644
--- a/src/python_testing/TC_EPM_2_1.py
+++ b/src/python_testing/TC_EPM_2_1.py
@@ -46,26 +46,48 @@
def steps_TC_EPM_2_1(self) -> list[TestStep]:
steps = [
- TestStep("1", "Commissioning, already done", is_commissioning=True),
- TestStep("2", "TH reads PowerMode attribute. Verify that the DUT response contains an enum8 value"),
- TestStep("3", "TH reads NumberOfMeasurementTypes attribute. Verify that the DUT response contains an uint8 value."),
- TestStep("4", "TH reads Accuracy attribute. Verify that the DUT response contains a list of MeasurementAccuracyStruct entries - Verify that the list has between 1 and NumberOfMeasurementTypes entries."),
- TestStep("5", "TH reads Ranges attribute. Verify that the DUT response contains a list of MeasurementRangeStruct entries - Verify that the list has between 0 and NumberOfMeasurementTypes entries."),
- TestStep("6", "TH reads Voltage attribute. Verify that the DUT response contains either null or an int64 value. Value has to be between a range of -2^62 to 2^62."),
- TestStep("7", "TH reads ActiveCurrent attribute. Verify that the DUT response contains either null or an int64 value. Value has to be between a range of -2^62 to 2^62."),
- TestStep("8", "TH reads ReactiveCurrent attribute. Verify that the DUT response contains either null or an int64 value. Value has to be between a range of -2^62 to 2^62."),
- TestStep("9", "TH reads ApparentCurrent attribute. Verify that the DUT response contains either null or an int64 value. Value has to be between a range of 0 to 2^62."),
- TestStep("10", "TH reads ActivePower attribute. Verify that the DUT response contains either null or an int64 value. Value has to be between a range of -2^62 to 2^62."),
- TestStep("11", "TH reads ReactivePower attribute. Verify that the DUT response contains either null or an int64 value. Value has to be between a range of -2^62 to 2^62."),
- TestStep("12", "TH reads ApparentPower attribute. Verify that the DUT response contains either null or an int64 value. Value has to be between a range of -2^62 to 2^62."),
- TestStep("13", "TH reads RMSVoltage attribute. Verify that the DUT response contains either null or an int64 value. Value has to be between a range of -2^62 to 2^62."),
- TestStep("14", "TH reads RMSCurrent attribute. Verify that the DUT response contains either null or an int64 value. Value has to be between a range of -2^62 to 2^62."),
- TestStep("15", "TH reads RMSPower attribute. Verify that the DUT response contains either null or an int64 value. Value has to be between a range of -2^62 to 2^62."),
- TestStep("16", "TH reads Frequency attribute. Verify that the DUT response contains either null or an int64 value. Value has to be between a range of 0 to 1000000."),
- TestStep("17", "TH reads HarmonicCurrents attribute. Verify that the DUT response contains a list of HarmonicMeasurementStruct entries."),
- TestStep("18", "TH reads HarmonicPhases attribute. Verify that the DUT response contains a list of HarmonicMeasurementStruct entries."),
- TestStep("19", "TH reads PowerFactor attribute. Verify that the DUT response contains either null or an int64 value. Value has to be between a range of -10000 to 10000."),
- TestStep("20", "TH reads NeutralCurrent attribute. Verify that the DUT response contains either null or an int64 value. Value has to be between a range of -2^62 to 2^62."),
+ TestStep("1", "Commissioning, already done",
+ is_commissioning=True),
+ TestStep("2", "TH reads PowerMode attribute",
+ "Verify that the DUT response contains an enum8 value"),
+ TestStep("3", "TH reads NumberOfMeasurementTypes attribute",
+ "Verify that the DUT response contains an uint8 value."),
+ TestStep("4", "TH reads Accuracy attribute",
+ "Verify that the DUT response contains a list of MeasurementAccuracyStruct entries ",
+ "Verify that the list has between 1 and NumberOfMeasurementTypes entries."),
+ TestStep("5", "TH reads Ranges attribute",
+ "Verify that the DUT response contains a list of MeasurementRangeStruct entries ",
+ "Verify that the list has between 0 and NumberOfMeasurementTypes entries."),
+ TestStep("6", "TH reads Voltage attribute",
+ "Verify that the DUT response contains either null or an int64 value. Value has to be between a range of -2^62 to 2^62."),
+ TestStep("7", "TH reads ActiveCurrent attribute",
+ "Verify that the DUT response contains either null or an int64 value. Value has to be between a range of -2^62 to 2^62."),
+ TestStep("8", "TH reads ReactiveCurrent attribute",
+ "Verify that the DUT response contains either null or an int64 value. Value has to be between a range of -2^62 to 2^62."),
+ TestStep("9", "TH reads ApparentCurrent attribute",
+ "Verify that the DUT response contains either null or an int64 value. Value has to be between a range of 0 to 2^62."),
+ TestStep("10", "TH reads ActivePower attribute",
+ "Verify that the DUT response contains either null or an int64 value. Value has to be between a range of -2^62 to 2^62."),
+ TestStep("11", "TH reads ReactivePower attribute",
+ "Verify that the DUT response contains either null or an int64 value. Value has to be between a range of -2^62 to 2^62."),
+ TestStep("12", "TH reads ApparentPower attribute",
+ "Verify that the DUT response contains either null or an int64 value. Value has to be between a range of -2^62 to 2^62."),
+ TestStep("13", "TH reads RMSVoltage attribute",
+ "Verify that the DUT response contains either null or an int64 value. Value has to be between a range of -2^62 to 2^62."),
+ TestStep("14", "TH reads RMSCurrent attribute",
+ "Verify that the DUT response contains either null or an int64 value. Value has to be between a range of -2^62 to 2^62."),
+ TestStep("15", "TH reads RMSPower attribute",
+ "Verify that the DUT response contains either null or an int64 value. Value has to be between a range of -2^62 to 2^62."),
+ TestStep("16", "TH reads Frequency attribute",
+ "Verify that the DUT response contains either null or an int64 value. Value has to be between a range of 0 to 1000000."),
+ TestStep("17", "TH reads HarmonicCurrents attribute",
+ "Verify that the DUT response contains a list of HarmonicMeasurementStruct entries."),
+ TestStep("18", "TH reads HarmonicPhases attribute",
+ "Verify that the DUT response contains a list of HarmonicMeasurementStruct entries."),
+ TestStep("19", "TH reads PowerFactor attribute",
+ "Verify that the DUT response contains either null or an int64 value. Value has to be between a range of -10000 to 10000."),
+ TestStep("20", "TH reads NeutralCurrent attribute",
+ "Verify that the DUT response contains either null or an int64 value. Value has to be between a range of -2^62 to 2^62."),
]
return steps
@@ -109,7 +131,8 @@
for index, range_entry in enumerate(measurement.accuracyRanges):
logging.info(f" [{index}] rangeMin:{range_entry.rangeMin} rangeMax:{range_entry.rangeMax} percentMax:{range_entry.percentMax} percentMin:{range_entry.percentMin} percentTypical:{range_entry.percentTypical} fixedMax:{range_entry.fixedMax} fixedMin:{range_entry.fixedMin} fixedTypical:{range_entry.fixedTypical}")
- asserts.assert_greater(range_entry.rangeMax, range_entry.rangeMin, "rangeMax should be > rangeMin")
+ asserts.assert_greater(
+ range_entry.rangeMax, range_entry.rangeMin, "rangeMax should be > rangeMin")
if index == 0:
minimum_range = range_entry.rangeMin
maximum_range = range_entry.rangeMax
@@ -129,7 +152,8 @@
asserts.assert_equal(minimum_range, measurement.minMeasuredValue,
"The minMeasuredValue must be the same as any of the minimum of all rangeMin's")
- asserts.assert_is(found_active_power, True, "There must be an ActivePower measurement accuracy")
+ asserts.assert_is(found_active_power, True,
+ "There must be an ActivePower measurement accuracy")
asserts.assert_equal(len(accuracy), number_of_measurements,
"The number of accuracy entries should match the NumberOfMeasurementTypes")
@@ -202,9 +226,11 @@
logger.info(f"Rx'd HarmonicCurrents: {harmonic_currents}")
asserts.assert_is(type(harmonic_currents), list)
for index, entry in enumerate(harmonic_currents):
- logging.info(f" [{index}] order:{entry.order} measurement:{entry.measurement}")
+ logging.info(
+ f" [{index}] order:{entry.order} measurement:{entry.measurement}")
asserts.assert_greater_equal(entry.order, 1)
- self.check_value_in_range("Measurement", entry.measurement, MIN_INT64_ALLOWED, MAX_INT64_ALLOWED)
+ self.check_value_in_range(
+ "Measurement", entry.measurement, MIN_INT64_ALLOWED, MAX_INT64_ALLOWED)
self.step("18")
if self.pics_guard(Clusters.ElectricalPowerMeasurement.Attributes.HarmonicPhases.attribute_id in supported_attributes):
@@ -212,9 +238,11 @@
logger.info(f"Rx'd HarmonicPhases: {harmonic_phases}")
asserts.assert_is(type(harmonic_phases), list)
for index, entry in enumerate(harmonic_phases):
- logging.info(f" [{index}] order:{entry.order} measurement:{entry.measurement}")
+ logging.info(
+ f" [{index}] order:{entry.order} measurement:{entry.measurement}")
asserts.assert_greater_equal(entry.order, 1)
- self.check_value_in_range("Measurement", entry.measurement, MIN_INT64_ALLOWED, MAX_INT64_ALLOWED)
+ self.check_value_in_range(
+ "Measurement", entry.measurement, MIN_INT64_ALLOWED, MAX_INT64_ALLOWED)
self.step("19")
if self.pics_guard(Clusters.ElectricalPowerMeasurement.Attributes.PowerFactor.attribute_id in supported_attributes):
diff --git a/src/python_testing/TC_EPM_2_2.py b/src/python_testing/TC_EPM_2_2.py
index b4a1079..68c6c59 100644
--- a/src/python_testing/TC_EPM_2_2.py
+++ b/src/python_testing/TC_EPM_2_2.py
@@ -44,17 +44,25 @@
def steps_TC_EPM_2_2(self) -> list[TestStep]:
steps = [
- TestStep("1", "Commissioning, already done", is_commissioning=True),
- TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster. Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"),
+ TestStep("1", "Commissioning, already done",
+ is_commissioning=True),
+ TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster",
+ "Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"),
TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EPM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EPM.TEST_EVENT_TRIGGER for Start Fake Load Test 1kW Event"),
TestStep("4", "Wait 3 seconds"),
- TestStep("4a", "TH reads from the DUT the ActivePower attribute. Verify the read is successful and that the value is between 980'000 and 1'020'000 mW. Note the value read."),
- TestStep("4b", "TH reads from the DUT the ActiveCurrent attribute. Verify the read is successful and that the value is between 3'848 and 4'848 mA. Note the value read."),
- TestStep("4c", "TH reads from the DUT the Voltage attribute. Verify the read is successful and that the value is between 229'000 and 231'000 mV. Note the value read."),
+ TestStep("4a", "TH reads from the DUT the ActivePower attribute",
+ "Verify the read is successful and that the value is between 980'000 and 1'020'000 mW. Note the value read."),
+ TestStep("4b", "TH reads from the DUT the ActiveCurrent attribute",
+ "Verify the read is successful and that the value is between 3'848 and 4'848 mA. Note the value read."),
+ TestStep("4c", "TH reads from the DUT the Voltage attribute",
+ "Verify the read is successful and that the value is between 229'000 and 231'000 mV. Note the value read."),
TestStep("5", "Wait 3 seconds"),
- TestStep("5a", "TH reads from the DUT the ActivePower attribute. Verify the read is successful, that the value is between '980'000 and 1'020'000 mW, and the value is different from the value read in step 4a."),
- TestStep("5b", "TH reads from the DUT the ActiveCurrent attribute. Verify the read is successful, that the value is between 3'848 and 4'848 mA, and the value is different from the value read in step 4b."),
- TestStep("5c", "TH reads from the DUT the Voltage attribute. Verify the read is successful, that the value is between 229'000 and 231'000 mV, and the value is different from the value read in step 4c."),
+ TestStep("5a", "TH reads from the DUT the ActivePower attribute",
+ "Verify the read is successful, that the value is between '980'000 and 1'020'000 mW, and the value is different from the value read in step 4a."),
+ TestStep("5b", "TH reads from the DUT the ActiveCurrent attribute",
+ "Verify the read is successful, that the value is between 3'848 and 4'848 mA, and the value is different from the value read in step 4b."),
+ TestStep("5c", "TH reads from the DUT the Voltage attribute",
+ "Verify the read is successful, that the value is between 229'000 and 231'000 mV, and the value is different from the value read in step 4c."),
TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EPM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EPM.TEST_EVENT_TRIGGER for Stop Fake Readings Test Event."),
]
@@ -78,15 +86,18 @@
self.step("4a")
# Active power is Mandatory
- active_power = await self.check_epm_attribute_in_range("ActivePower", 980000, 1020000) # 1kW +/- 20W
+ # 1kW +/- 20W
+ active_power = await self.check_epm_attribute_in_range("ActivePower", 980000, 1020000)
self.step("4b")
if self.pics_guard(self.check_pics("EPM.S.A0005")):
- active_current = await self.check_epm_attribute_in_range("ActiveCurrent", 3848, 4848) # 4.348 A +/- 500mA
+ # 4.348 A +/- 500mA
+ active_current = await self.check_epm_attribute_in_range("ActiveCurrent", 3848, 4848)
self.step("4c")
if self.pics_guard(self.check_pics("EPM.S.A0004")):
- voltage = await self.check_epm_attribute_in_range("Voltage", 229000, 231000) # 230V +/- 1V
+ # 230V +/- 1V
+ voltage = await self.check_epm_attribute_in_range("Voltage", 229000, 231000)
self.step("5")
# After 3 seconds...
@@ -94,20 +105,24 @@
self.step("5a")
# Active power is Mandatory
- active_power2 = await self.check_epm_attribute_in_range("ActivePower", 980000, 1020000) # 1kW +/- 20W
+ # 1kW +/- 20W
+ active_power2 = await self.check_epm_attribute_in_range("ActivePower", 980000, 1020000)
asserts.assert_not_equal(active_power, active_power2,
f"Expected ActivePower readings to have changed {active_power}, {active_power2}")
self.step("5b")
if self.pics_guard(self.check_pics("EPM.S.A0005")):
- active_current2 = await self.check_epm_attribute_in_range("ActiveCurrent", 3848, 4848) # 4.348 A +/- 500mA
+ # 4.348 A +/- 500mA
+ active_current2 = await self.check_epm_attribute_in_range("ActiveCurrent", 3848, 4848)
asserts.assert_not_equal(active_current, active_current2,
f"Expected ActiveCurrent readings to have changed {active_current}, {active_current2}")
self.step("5c")
if self.pics_guard(self.check_pics("EPM.S.A0004")):
- voltage2 = await self.check_epm_attribute_in_range("Voltage", 229000, 231000) # 230V +/- 1V
- asserts.assert_not_equal(voltage, voltage2, f"Expected Voltage readings to have changed {voltage}, {voltage2}")
+ # 230V +/- 1V
+ voltage2 = await self.check_epm_attribute_in_range("Voltage", 229000, 231000)
+ asserts.assert_not_equal(
+ voltage, voltage2, f"Expected Voltage readings to have changed {voltage}, {voltage2}")
self.step("6")
await self.send_test_event_trigger_stop_fake_readings()