-
Hi! I am trying to use In particular -- I'd like, optionally, to have a per-Scenario temporary directory not be deleted when the test fails, so that it is possible for the user to examine the contents of the temp dir. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
@ms-ati you have two options:
So you should set some sort of flag at the last step of the scenario in your |
Beta Was this translation helpful? Give feedback.
-
Thank you @tyranron! My question to clarify is:
Thank you for pointing out the after hook and World life cycle. In either place, how can I determine whether the current Scenario is in the Failed state? I haven’t been able to find a channel where that information (which I see in |
Beta Was this translation helpful? Give feedback.
-
Hi @tyranron @ilslv, thank you so much for introducing the I have it working here: https://github.com/ms-ati/aruba-rs/blob/bc225e6d14dedfaeafb36abb6144d87f99ba0e91/examples/aruba_hello_world/tests/cucumber_aruba_example.rs#L11 However, I'm still looking for a way to configure this after hook in the I cannot, however, figure out how to either call |
Beta Was this translation helpful? Give feedback.
@ms-ati you have two options:
.after()
hook. It runs even if the scenario has failed, however is enabled for all executed scenarios, which may not be convenient.Drop
implementations. This can be more tedious in terms of writing code, but allows any desired level of granularity.World
has a lifespan of a scenario. So you can just put it into yourWorld
asOption<TempDir>
.So you should set some sort of flag at the last step of the scenario in your
World
. And if it's not set, t…