Skip to content
Durable Workflowrust

durable_workflow/testing/
mod.rs

1//! Server-free workflow replay and in-process workflow/activity tests.
2
3mod environment;
4mod history;
5mod runner;
6
7pub use environment::{ReplayReport, WorkflowEnvironment};
8pub use history::WorkflowHistory;
9
10/// A testing input or execution limit that prevents a trustworthy result.
11#[derive(Clone, Debug, thiserror::Error, PartialEq, Eq)]
12#[non_exhaustive]
13pub enum TestingError {
14    #[error("invalid or incomplete workflow history: {0}")]
15    InvalidHistory(String),
16    #[error("in-process workflow testing does not support command {0:?}")]
17    UnsupportedCommand(String),
18    #[error("in-process workflow testing exceeded its {0}-step limit")]
19    StepLimit(usize),
20    #[error("workflow is waiting without a resolvable test operation")]
21    WorkflowBlocked,
22}