dream_test/parallel
Types
Configuration for parallel test execution.
pub type ParallelConfig {
ParallelConfig(max_concurrency: Int, default_timeout_ms: Int)
}
Constructors
-
ParallelConfig(max_concurrency: Int, default_timeout_ms: Int)
Values
pub fn default_config() -> ParallelConfig
Default parallel configuration: 4 concurrent tests, 5 second timeout.
pub fn run_parallel(
config: ParallelConfig,
test_cases: List(types.TestCase),
) -> List(types.TestResult)
Run tests in parallel with the given configuration.
Tests are executed concurrently up to max_concurrency. Results are returned in the same order as the input tests.
pub fn run_suite_parallel(
config: ParallelConfig,
suite: types.TestSuite,
) -> List(types.TestResult)
Run a test suite with before_all/after_all semantics.
Execution flow for each group:
- Run before_all hooks sequentially
- If any fail, mark all tests in group as SetupFailed
- Run tests in parallel (with their before_each/after_each)
- Wait for all tests to complete
- Run after_all hooks sequentially
- Recurse for nested groups