Struct cucumber::runner::Basic [−][src]
pub struct Basic<World, F = WhichScenarioFn, Before = BeforeHookFn<World>, After = AfterHookFn<World>> { /* fields omitted */ }Expand description
Default Runner implementation which follows order guarantees from
the Runner trait docs.
Executes Scenarios concurrently based on the custom function, which
returns ScenarioType. Also, can limit maximum number of concurrent
Scenarios.
Implementations
pub fn which_scenario<F>(self, func: F) -> Basic<World, F, Before, After> where
F: Fn(&Feature, Option<&Rule>, &Scenario) -> ScenarioType + 'static,
pub fn which_scenario<F>(self, func: F) -> Basic<World, F, Before, After> where
F: Fn(&Feature, Option<&Rule>, &Scenario) -> ScenarioType + 'static,
Function determining whether a Scenario is Concurrent or
a Serial one.
Sets a hook, executed on each Scenario before running all its
Steps, including Background ones.
Sets hook, executed on each Scenario after running all its
Steps, even after Skipped of Failed ones.
Last World argument is supplied to the function, in case it was
initialized before by running before hook or any non-failed
Step. In case the last Scenario’s Step failed, we want to
return event with an exact World state. Also, we don’t want to impose
additional Clone bounds on World, so the only option left is to
pass None to the function.
Sets the given Collection of Steps to this Runner.
Trait Implementations
impl<W, Which, Before, After> Runner<W> for Basic<W, Which, Before, After> where
W: World,
Which: Fn(&Feature, Option<&Rule>, &Scenario) -> ScenarioType + 'static,
Before: for<'a> Fn(&'a Feature, Option<&'a Rule>, &'a Scenario, &'a mut W) -> LocalBoxFuture<'a, ()> + 'static,
After: for<'a> Fn(&'a Feature, Option<&'a Rule>, &'a Scenario, Option<&'a mut W>) -> LocalBoxFuture<'a, ()> + 'static,
impl<W, Which, Before, After> Runner<W> for Basic<W, Which, Before, After> where
W: World,
Which: Fn(&Feature, Option<&Rule>, &Scenario) -> ScenarioType + 'static,
Before: for<'a> Fn(&'a Feature, Option<&'a Rule>, &'a Scenario, &'a mut W) -> LocalBoxFuture<'a, ()> + 'static,
After: for<'a> Fn(&'a Feature, Option<&'a Rule>, &'a Scenario, Option<&'a mut W>) -> LocalBoxFuture<'a, ()> + 'static,
CLI options of this Runner. In case no options should be introduced,
just use cli::Empty. Read more
type EventStream = LocalBoxStream<'static, Result<Event<Cucumber<W>>>>
type EventStream = LocalBoxStream<'static, Result<Event<Cucumber<W>>>>
Output events [Stream].