-
Notifications
You must be signed in to change notification settings - Fork 255
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
Support nested steps #639
Comments
Hi, your approach is possible, but I think it will come with many limitations:
Even thought it is possible and also already be implemented in Goconvey, I think Godog should not follow the same, as we're using BDD, it leverages the collaboration of the whole team, the step definitions of |
I agree, |
🤔 What's the problem you're trying to solve?
The current flat design of Godog tests makes the structure difficult to read and navigate. Unlike Goconvey, Godog doesn't natively support nested steps, which would improve readability and allow for easier reuse of variables from parent functions. This limitation makes writing and maintaining tests more challenging and time-consuming
✨ What's your proposed solution?
Implement a feature in Godog that allows for nested steps, similar to Goconvey's approach. This would involve:
As an initial attempt, I created a custom ScenarioBuilder struct to simulate nested steps:
This approach initially worked
But (!) I encountered issues when more test cases were added.
⛏ Have you considered any alternatives or workarounds?
No response
📚 Any additional context?
No response
The text was updated successfully, but these errors were encountered: