pub trait StepTrait {
// Required methods
fn plan(&self, randomizer: &Randomizer) -> Result<Plan>;
fn is_success(
&self,
execution_result: &Output,
plan_ctx: &PlanCtx,
) -> Result<bool, &'static str>;
fn to_yaml(&self) -> Value;
// Provided methods
fn setup(&self) -> Result<()> { ... }
fn run_check(&self) -> Option<String> { ... }
fn run_test(&self) -> Option<String> { ... }
}Expand description
A trait that defines the behavior required for steps in the execution process.
Required Methods§
Sourcefn plan(&self, randomizer: &Randomizer) -> Result<Plan>
fn plan(&self, randomizer: &Randomizer) -> Result<Plan>
Sourcefn is_success(
&self,
execution_result: &Output,
plan_ctx: &PlanCtx,
) -> Result<bool, &'static str>
fn is_success( &self, execution_result: &Output, plan_ctx: &PlanCtx, ) -> Result<bool, &'static str>
Determines if the execution result indicates success for this step.
the bool result point if the runner should continue to the next steps or not.
§Errors
When plan result parsing is not the expected behavior.
Provided Methods§
Sourcefn setup(&self) -> Result<()>
fn setup(&self) -> Result<()>
Prepares the setup by creating necessary directories and performing initialization steps.
§Errors
Returns an error if the setup fails, such as when it is unable to create the required directory.