Skip to content

Commit

Permalink
Removed sleeps between messages to the DUT as they are not needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
hicklin committed Feb 8, 2024
1 parent 0b49c5d commit 4e0e2d8
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 48 deletions.
3 changes: 0 additions & 3 deletions src/python_testing/TC_RVCCLEANM_2_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches
from mobly import asserts

wait_time = 0.5


# This test requires several additional command line arguments
# run with
Expand Down Expand Up @@ -96,7 +94,6 @@ async def test_TC_RVCCLEANM_2_1(self):
# Ensure that the device is in the correct state
if self.is_ci:
self.write_to_app_pipe('{"Name": "Reset"}')
sleep(wait_time)

self.print_step(2, "Read SupportedModes attribute")
supported_modes = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes)
Expand Down
4 changes: 0 additions & 4 deletions src/python_testing/TC_RVCCLEANM_2_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main
from mobly import asserts

wait_time = 0.5


class TC_RVCCLEANM_2_2(MatterBaseTest):

Expand Down Expand Up @@ -94,13 +92,11 @@ async def test_TC_RVCCLEANM_2_2(self):
# Ensure that the device is in the correct state
if self.is_ci:
self.write_to_app_pipe('{"Name": "Reset"}')
sleep(wait_time)

self.print_step(
2, "Manually put the device in a state in which the RVC Run Mode cluster’s CurrentMode attribute is set to a mode without the Idle mode tag.")
if self.is_ci:
await self.send_run_change_to_mode_cmd(1)
sleep(wait_time)
else:
input("Press Enter when done.\n")

Expand Down
22 changes: 0 additions & 22 deletions src/python_testing/TC_RVCOPSTATE_2_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main
from mobly import asserts

wait_time = 0.5


class TC_RVCOPSTATE_2_1(MatterBaseTest):
def __init__(self, *args):
Expand Down Expand Up @@ -88,7 +86,6 @@ async def test_TC_RVCOPSTATE_2_1(self):
# Ensure that the device is in the correct state
if self.is_ci:
self.write_to_app_pipe('{"Name": "Reset"}')
sleep(wait_time)

if self.check_pics("RVCOPSTATE.S.A0000"):
self.print_step(2, "Read PhaseList attribute")
Expand Down Expand Up @@ -166,51 +163,43 @@ async def test_TC_RVCOPSTATE_2_1(self):
self.print_step("6c", "Manually put the device in the running state")
if self.is_ci:
await self.send_run_change_to_mode_cmd(1)
sleep(wait_time)
else:
input("Press Enter when done.\n")
await self.read_and_validate_opstate(step="6d", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kRunning)
if self.check_pics("RVCOPSTATE.S.M.ST_PAUSED"):
self.print_step("6e", "Manually put the device in the paused state")
if self.is_ci:
await self.send_pause_cmd()
sleep(wait_time)
else:
input("Press Enter when done.\n")
await self.read_and_validate_opstate(step="6f", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kPaused)
if self.check_pics("RVCOPSTATE.S.M.ST_ERROR"):
self.print_step("6g", "Manually put the device in the error state")
if self.is_ci:
self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "UnableToStartOrResume"}')
sleep(wait_time)
else:
input("Press Enter when done.\n")
await self.read_and_validate_opstate(step="6h", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kError)
if self.check_pics("RVCOPSTATE.S.M.ST_SEEKING_CHARGER"):
self.print_step("6i", "Manually put the device in the seeking charger state")
if self.is_ci:
self.write_to_app_pipe('{"Name": "Reset"}')
sleep(wait_time)
await self.send_run_change_to_mode_cmd(1)
sleep(wait_time)
await self.send_run_change_to_mode_cmd(0)
sleep(wait_time)
else:
input("Press Enter when done.\n")
await self.read_and_validate_opstate(step="6j", expected_state=Clusters.RvcOperationalState.Enums.OperationalStateEnum.kSeekingCharger)
if self.check_pics("RVCOPSTATE.S.M.ST_CHARGING"):
self.print_step("6k", "Manually put the device in the charging state")
if self.is_ci:
self.write_to_app_pipe('{"Name": "ChargerFound"}')
sleep(wait_time)
else:
input("Press Enter when done.\n")
await self.read_and_validate_opstate(step="6l", expected_state=Clusters.RvcOperationalState.Enums.OperationalStateEnum.kCharging)
if self.check_pics("RVCOPSTATE.S.M.ST_DOCKED"):
self.print_step("6m", "Manually put the device in the docked state")
if self.is_ci:
self.write_to_app_pipe('{"Name": "Charged"}')
sleep(wait_time)
else:
input("Press Enter when done.\n")
await self.read_and_validate_opstate(step="6n", expected_state=Clusters.RvcOperationalState.Enums.OperationalStateEnum.kDocked)
Expand Down Expand Up @@ -242,87 +231,76 @@ async def test_TC_RVCOPSTATE_2_1(self):
self.print_step("7c", "Manually put the device in the unable to start or resume error state")
if self.is_ci:
self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "UnableToStartOrResume"}')
sleep(wait_time)
else:
input("Press Enter when done.\n")
await self.read_and_validate_operror(step="7d", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kUnableToStartOrResume)
if self.check_pics("RVCOPSTATE.S.M.ERR_UNABLE_TO_COMPLETE_OPERATION"):
self.print_step("7e", "Manually put the device in the unable to complete operation error state")
if self.is_ci:
self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "UnableToCompleteOperation"}')
sleep(wait_time)
else:
input("Press Enter when done.\n")
await self.read_and_validate_operror(step="7f", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kUnableToCompleteOperation)
if self.check_pics("RVCOPSTATE.S.M.ERR_COMMAND_INVALID_IN_STATE"):
self.print_step("7g", "Manually put the device in the command invalid error state")
if self.is_ci:
self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "CommandInvalidInState"}')
sleep(wait_time)
else:
input("Press Enter when done.\n")
await self.read_and_validate_operror(step="7h", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kCommandInvalidInState)
if self.check_pics("RVCOPSTATE.S.M.ERR_FAILED_TO_FIND_CHARGING_DOCK"):
self.print_step("7i", "Manually put the device in the failed to find dock error state")
if self.is_ci:
self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "FailedToFindChargingDock"}')
sleep(wait_time)
else:
input("Press Enter when done.\n")
await self.read_and_validate_operror(step="7j", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kFailedToFindChargingDock)
if self.check_pics("RVCOPSTATE.S.M.ERR_STUCK"):
self.print_step("7k", "Manually put the device in the stuck error state")
if self.is_ci:
self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "Stuck"}')
sleep(wait_time)
else:
input("Press Enter when done.\n")
await self.read_and_validate_operror(step="7l", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kStuck)
if self.check_pics("RVCOPSTATE.S.M.ERR_DUST_BIN_MISSING"):
self.print_step("7m", "Manually put the device in the dust bin missing error state")
if self.is_ci:
self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "DustBinMissing"}')
sleep(wait_time)
else:
input("Press Enter when done.\n")
await self.read_and_validate_operror(step="7n", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kDustBinMissing)
if self.check_pics("RVCOPSTATE.S.M.ERR_DUST_BIN_FULL"):
self.print_step("7o", "Manually put the device in the dust bin full error state")
if self.is_ci:
self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "DustBinFull"}')
sleep(wait_time)
else:
input("Press Enter when done.\n")
await self.read_and_validate_operror(step="7p", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kDustBinFull)
if self.check_pics("RVCOPSTATE.S.M.ERR_WATER_TANK_EMPTY"):
self.print_step("7q", "Manually put the device in the water tank empty error state")
if self.is_ci:
self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "WaterTankEmpty"}')
sleep(wait_time)
else:
input("Press Enter when done.\n")
await self.read_and_validate_operror(step="7r", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kWaterTankEmpty)
if self.check_pics("RVCOPSTATE.S.M.ERR_WATER_TANK_MISSING"):
self.print_step("7s", "Manually put the device in the water tank missing error state")
if self.is_ci:
self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "WaterTankMissing"}')
sleep(wait_time)
else:
input("Press Enter when done.\n")
await self.read_and_validate_operror(step="7t", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kWaterTankMissing)
if self.check_pics("RVCOPSTATE.S.M.ERR_WATER_TANK_LID_OPEN"):
self.print_step("7u", "Manually put the device in the water tank lid open error state")
if self.is_ci:
self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "WaterTankLidOpen"}')
sleep(wait_time)
else:
input("Press Enter when done.\n")
await self.read_and_validate_operror(step="7v", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kWaterTankLidOpen)
if self.check_pics("RVCOPSTATE.S.M.ERR_MOP_CLEANING_PAD_MISSING"):
self.print_step("7w", "Manually put the device in the mop cleaning pad missing error state")
if self.is_ci:
self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "MopCleaningPadMissing"}')
sleep(wait_time)
else:
input("Press Enter when done.\n")
await self.read_and_validate_operror(step="7x", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kMopCleaningPadMissing)
Expand Down
13 changes: 0 additions & 13 deletions src/python_testing/TC_RVCOPSTATE_2_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches
from mobly import asserts

wait_time = 0.5


# Takes an OpState or RvcOpState state enum and returns a string representation
def state_enum_to_text(state_enum):
Expand Down Expand Up @@ -170,12 +168,10 @@ async def test_TC_RVCOPSTATE_2_3(self):
# Ensure that the device is in the correct state
if self.is_ci:
self.write_to_app_pipe('{"Name": "Reset"}')
sleep(wait_time)

self.print_step(2, "Manually put the device in a state where it can receive a Pause command")
if self.is_ci:
await self.send_run_change_to_mode_cmd(1)
sleep(wait_time)
else:
input("Press Enter when done.\n")

Expand Down Expand Up @@ -257,7 +253,6 @@ async def test_TC_RVCOPSTATE_2_3(self):
self.print_step(24, "Manually put the device in the Stopped(0x00) operational state")
if self.is_ci:
self.write_to_app_pipe('{"Name": "Reset"}')
sleep(wait_time)
else:
input("Press Enter when done.\n")

Expand All @@ -271,7 +266,6 @@ async def test_TC_RVCOPSTATE_2_3(self):
self.print_step(28, "Manually put the device in the Error(0x03) operational state")
if self.is_ci:
self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "Stuck"}')
sleep(wait_time)
else:
input("Press Enter when done.\n")

Expand All @@ -285,13 +279,9 @@ async def test_TC_RVCOPSTATE_2_3(self):
self.print_step(32, "Manually put the device in the Charging(0x41) operational state")
if self.is_ci:
self.write_to_app_pipe('{"Name": "Reset"}')
sleep(wait_time)
await self.send_run_change_to_mode_cmd(1)
sleep(wait_time)
await self.send_run_change_to_mode_cmd(0)
sleep(wait_time)
self.write_to_app_pipe('{"Name": "ChargerFound"}')
sleep(wait_time)
else:
input("Press Enter when done.\n")

Expand All @@ -312,7 +302,6 @@ async def test_TC_RVCOPSTATE_2_3(self):
self.print_step(38, "Manually put the device in the Docked(0x42) operational state")
if self.is_ci:
self.write_to_app_pipe('{"Name": "Charged"}')
sleep(wait_time)
else:
input("Press Enter when done.\n")

Expand All @@ -331,9 +320,7 @@ async def test_TC_RVCOPSTATE_2_3(self):
self.print_step(43, "Manually put the device in the SeekingCharger(0x40) operational state")
if self.is_ci:
await self.send_run_change_to_mode_cmd(1)
sleep(wait_time)
await self.send_run_change_to_mode_cmd(0)
sleep(wait_time)
else:
input("Press Enter when done.\n")

Expand Down
3 changes: 0 additions & 3 deletions src/python_testing/TC_RVCRUNM_2_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches
from mobly import asserts

wait_time = 0.5


# This test requires several additional command line arguments
# run with
Expand Down Expand Up @@ -91,7 +89,6 @@ async def test_TC_RVCRUNM_2_1(self):
# Ensure that the device is in the correct state
if self.is_ci:
self.write_to_app_pipe('{"Name": "Reset"}')
sleep(wait_time)

self.print_step(2, "Read SupportedModes attribute")
supported_modes = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes)
Expand Down
3 changes: 0 additions & 3 deletions src/python_testing/TC_RVCRUNM_2_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main
from mobly import asserts

wait_time = 0.5

# This test requires several additional command line arguments.
# Run the test with
# --int-arg PIXIT.RVCRUNM.MODE_A:<mode id> PIXIT.RVCRUNM.MODE_B:<mode id>
Expand Down Expand Up @@ -128,7 +126,6 @@ async def test_TC_RVCRUNM_2_2(self):
# Ensure that the device is in the correct state
if self.is_ci:
self.write_to_app_pipe('{"Name": "Reset"}')
sleep(wait_time)

self.print_step(2, "Manually put the device in a RVC Run Mode cluster mode with "
"the Idle(0x4000) mode tag and in a device state that allows changing to either "
Expand Down

0 comments on commit 4e0e2d8

Please sign in to comment.