cucumber-rs / cucumber

Cucumber testing framework for Rust. Fully native, no external test runners or dependencies.
https://cucumber-rs.github.io/cucumber/main
Apache License 2.0
564 stars 69 forks source link

How to run code when any scenario fails? #244

Closed ms-ati closed 1 year ago

ms-ati commented 1 year ago

Hi! I am trying to use ::after hook or find other means, to cause some code to run when a Scenario fails.

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.