You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to convert some of our automated testing to use cucumber-rs, but I'm finding it hard to tear down my tests.
If the last step fails, the after hook doesn't provide a World to work with. I need the World to get to its state and make decisions on tear down.
My after hook:
#[tokio::main]asyncfnmain(){BalloonWorld::cucumber().max_concurrent_scenarios(1).after(|_, _, _, maybe_world| {println!("AFTER! {:?}",maybe_world);Box::pin(asyncmove{println!("AFTER IN FUT {:?}",maybe_world);})}).run_and_exit("features").await;}
What's the recommended way to make this work?
Basically we're creating Fly.io apps and then we need to make sure they are tore down, whatever the outcome of the tests.
The text was updated successfully, but these errors were encountered:
@ilslv please, re-check. Once the World is initialized, it should be available in the After Hook.
@jeromegn another option to tear down is to do so in Drop for the World. We use such a techique a lot in our code bases, and don't use After Hook at all.
I'm attempting to convert some of our automated testing to use
cucumber-rs
, but I'm finding it hard to tear down my tests.If the last step fails, the
after
hook doesn't provide aWorld
to work with. I need theWorld
to get to its state and make decisions on tear down.My
after
hook:What's the recommended way to make this work?
Basically we're creating Fly.io apps and then we need to make sure they are tore down, whatever the outcome of the tests.
The text was updated successfully, but these errors were encountered: