testing
Unit testing stage implementation for CheckMate
Classes
TestStage
Bases: BaseStage[TestStageState]
Flexible stage implementation for testing
Attributes:
-
execute_error(int | None) –Simulates an error on a specific attempt.
-
rollback_error(bool) –Simulates an error during rollback.
-
execute_sleep(int) –Simulates a delay in execution.
-
modify_status(StageStatus | None) –Modifies the status to simulate a problem.
-
set_data(Any | None) –Sets data for the stage.
-
set_result(TestStageStateResult | None) –Sets result for the stage.
Attributes
Functions
execute_stage
Executes the stage.
Raises:
-
TestStageError–If
execute_erroris set and the current attempt is less than or equal toexecute_error.
get_test_data
rollback_stage
TestStageError
TestStageRollbackError
TestStageState
Bases: BaseStageState[TestStageStateResult]
Flexible state data model for testing
Attributes:
-
data(Dict) –A dictionary to store state data.
TestStageStateResult
Bases: BaseModel
Flexible state data model for testing
Attributes:
-
result_data(Dict) –A dictionary to store result data.