-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test fails without meaningfull error #80
Comments
Hey! Yes, that's bad. We'll fix it! |
I ran into another issue, where again some of my features causes an error. To my surprise, the official ruby-cucumber implementation seems to parse my features just fine. Unfortunately I can not share the feature file in question so far, due to legal reasons. Having the file name would already help, knowing in which line the parser gets unhappy would be excellent! |
I haven't the time to debug this right now, unfortunately, and didn't find time last week either. My guess is that it is this line: https://github.com/bbqsrc/cucumber-rust/blob/main/src/cucumber.rs#L100 If you use the example for the Any type in the std library, you can at least print the error before panicking by attempting to cast to |
https://github.com/bbqsrc/cucumber-rust/blob/main/src/cucumber.rs#L100 Looks like this line does not make sense anymore. Besides the problem mentioned here, what are your thoughts on using the library anyhow on steps definitions? Right now, a step can never fail. We could have something like:
|
I noticed that the error reporting fails only on async steps. Probably because we reset the panic hook, which tokio (using tokio on my experiments) also needs to set. I think the best approach would be to depend on some Async runtime (tokio or async-std) and then use spawn for async steps. Instead of setting a hook for panic, we just use the JoinHandle to fetch if the task failed with panic. |
Fixed in #128 as parsing errors are now propagated. |
Probably one of my features is erroneous, but which one? AFAICT this panics, but I have no clue why. In order to provide a smooth user experience it would be good to at least give a hint about which operation failed?
Runnning
RUST_BACKTRACE=full cargo test --test cucumber
yieldsThe text was updated successfully, but these errors were encountered: