Skip to content

Commit

Permalink
TC-LVL-2.3: Wording tweaks / approximate first report (project-chip#3…
Browse files Browse the repository at this point in the history
…4665)

* TC-LVL-2.3: Wording tweaks / approximate first report

* add missing skip marker
  • Loading branch information
cecille authored Jul 31, 2024
1 parent 7b2adc6 commit 6da66b7
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/python_testing/TC_LVL_2_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def steps_TC_LVL_2_3(self) -> list[TestStep]:
test_plan_support.verify_success()),
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",
"Subscription successfully established"),
TestStep(7, f"{THcommand} MoveToLevel with Level field set to maxLevel, TransitionTime field set to 10 and remaining fields set to 0",
TestStep(7, f"{THcommand} MoveToLevel with Level field set to maxLevel, TransitionTime field set to 100 (10s) and remaining fields set to 0",
test_plan_support.verify_success()),
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."),
TestStep(9, "TH verifies that reportedCurrentLevelValuesList does not contain more than 10 entries for CurrentLevel",
Expand All @@ -65,18 +65,18 @@ def steps_TC_LVL_2_3(self) -> list[TestStep]:
TestStep(13, "If the LT feature is not supported, skip remaining steps and end test case"),
# 14 is missing in the test plan
TestStep(15, "TH stores the reported values of RemainingTime in all incoming reports for RemainingTime attribute, that contains data in reportedRemainingTimeValuesList."),
TestStep(16, f" {THcommand} MoveToLevel with Level field set to startCurrentLevel, TransitionTime field set to 10 and remaining fields set to 0",
TestStep(16, f" {THcommand} MoveToLevel with Level field set to startCurrentLevel, TransitionTime field set to 100 (10s) and remaining fields set to 0",
test_plan_support.verify_success()),
TestStep(17, "Wait for 5 seconds"),
TestStep(18, f"{THcommand} MoveToLevel with Level field set to startCurrentLevel, TransitionTime field set to 15 and remaining fields set to 0",
TestStep(18, f"{THcommand} MoveToLevel with Level field set to startCurrentLevel, TransitionTime field set to 150 (15s) and remaining fields set to 0",
test_plan_support.verify_success()),
TestStep(19, "Wait for 20 seconds"),
TestStep(20, "TH verifies reportedRemainingTimeValuesList contains three entries",
"reportedRemainingTimeValuesList has 3 entries in the list"),
TestStep(21, "TH verifies the first entry in reportedRemainingTimeValuesList is 10",
"The first entry in reportedRemainingTimeValuesList is equal to 10"),
TestStep(22, "TH verifies the second entry in reportedRemainingTimeValuesList is 15",
"The second entry in reportedRemainingTimeValuesList is equal to 15"),
TestStep(21, "TH verifies the first entry in reportedRemainingTimeValuesList is approximately 100 (10s)",
"The first entry in reportedRemainingTimeValuesList is approximately equal to 100"),
TestStep(22, "TH verifies the second entry in reportedRemainingTimeValuesList is approximately 150",
"The second entry in reportedRemainingTimeValuesList is approximately equal to 150"),
TestStep(23, "TH verifies the third entry in reportedRemainingTimeValuesList is 0",
"The third entry in reportedRemainingTimeValuesList is equal to 0")
]
Expand Down Expand Up @@ -127,6 +127,8 @@ async def test_TC_LVL_2_3(self):
if count == 1:
entry = sub_handler.attribute_reports[lvl.Attributes.CurrentLevel][-1]
asserts.assert_equal(entry.value, max_level, "Entry is not equal to max level")
else:
self.mark_current_step_skipped()

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

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

0 comments on commit 6da66b7

Please sign in to comment.