Skip to content

Commit 6da66b7

Browse files
authored
TC-LVL-2.3: Wording tweaks / approximate first report (#34665)
* TC-LVL-2.3: Wording tweaks / approximate first report * add missing skip marker
1 parent 7b2adc6 commit 6da66b7

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/python_testing/TC_LVL_2_3.py

+10-8
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def steps_TC_LVL_2_3(self) -> list[TestStep]:
5151
test_plan_support.verify_success()),
5252
TestStep(6, "Set up a subscription wildcard subscription for the Level Control Cluster, with MinIntervalFloor set to 0, MaxIntervalCeiling set to 30 and KeepSubscriptions set to false",
5353
"Subscription successfully established"),
54-
TestStep(7, f"{THcommand} MoveToLevel with Level field set to maxLevel, TransitionTime field set to 10 and remaining fields set to 0",
54+
TestStep(7, f"{THcommand} MoveToLevel with Level field set to maxLevel, TransitionTime field set to 100 (10s) and remaining fields set to 0",
5555
test_plan_support.verify_success()),
5656
TestStep(8, "TH stores the reported values of CurrentLevel in all incoming reports for CurrentLevel attribute, that contains data in reportedCurrentLevelValuesList, over a period of 30 seconds."),
5757
TestStep(9, "TH verifies that reportedCurrentLevelValuesList does not contain more than 10 entries for CurrentLevel",
@@ -65,18 +65,18 @@ def steps_TC_LVL_2_3(self) -> list[TestStep]:
6565
TestStep(13, "If the LT feature is not supported, skip remaining steps and end test case"),
6666
# 14 is missing in the test plan
6767
TestStep(15, "TH stores the reported values of RemainingTime in all incoming reports for RemainingTime attribute, that contains data in reportedRemainingTimeValuesList."),
68-
TestStep(16, f" {THcommand} MoveToLevel with Level field set to startCurrentLevel, TransitionTime field set to 10 and remaining fields set to 0",
68+
TestStep(16, f" {THcommand} MoveToLevel with Level field set to startCurrentLevel, TransitionTime field set to 100 (10s) and remaining fields set to 0",
6969
test_plan_support.verify_success()),
7070
TestStep(17, "Wait for 5 seconds"),
71-
TestStep(18, f"{THcommand} MoveToLevel with Level field set to startCurrentLevel, TransitionTime field set to 15 and remaining fields set to 0",
71+
TestStep(18, f"{THcommand} MoveToLevel with Level field set to startCurrentLevel, TransitionTime field set to 150 (15s) and remaining fields set to 0",
7272
test_plan_support.verify_success()),
7373
TestStep(19, "Wait for 20 seconds"),
7474
TestStep(20, "TH verifies reportedRemainingTimeValuesList contains three entries",
7575
"reportedRemainingTimeValuesList has 3 entries in the list"),
76-
TestStep(21, "TH verifies the first entry in reportedRemainingTimeValuesList is 10",
77-
"The first entry in reportedRemainingTimeValuesList is equal to 10"),
78-
TestStep(22, "TH verifies the second entry in reportedRemainingTimeValuesList is 15",
79-
"The second entry in reportedRemainingTimeValuesList is equal to 15"),
76+
TestStep(21, "TH verifies the first entry in reportedRemainingTimeValuesList is approximately 100 (10s)",
77+
"The first entry in reportedRemainingTimeValuesList is approximately equal to 100"),
78+
TestStep(22, "TH verifies the second entry in reportedRemainingTimeValuesList is approximately 150",
79+
"The second entry in reportedRemainingTimeValuesList is approximately equal to 150"),
8080
TestStep(23, "TH verifies the third entry in reportedRemainingTimeValuesList is 0",
8181
"The third entry in reportedRemainingTimeValuesList is equal to 0")
8282
]
@@ -127,6 +127,8 @@ async def test_TC_LVL_2_3(self):
127127
if count == 1:
128128
entry = sub_handler.attribute_reports[lvl.Attributes.CurrentLevel][-1]
129129
asserts.assert_equal(entry.value, max_level, "Entry is not equal to max level")
130+
else:
131+
self.mark_current_step_skipped()
130132

131133
if count > 1:
132134
self.step(11)
@@ -173,7 +175,7 @@ async def test_TC_LVL_2_3(self):
173175
self.step(21)
174176
remaining_time = sub_handler.attribute_reports[lvl.Attributes.RemainingTime]
175177
logging.info(f'Reamining time reports: {remaining_time}')
176-
asserts.assert_equal(remaining_time[0].value, 100, "Unexpected first RemainingTime report")
178+
asserts.assert_almost_equal(remaining_time[0].value, 100, delta=10, msg="Unexpected first RemainingTime report")
177179

178180
self.step(22)
179181
asserts.assert_almost_equal(remaining_time[1].value, 150, delta=10, msg="Unexpected second RemainingTime report")

0 commit comments

Comments
 (0)