-
Notifications
You must be signed in to change notification settings - Fork 256
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
feature files in directory still expects the step definitions to be in the root #373
Comments
Hi @alwindoss, thanks for the feature request! Where would you want to define these?
|
Ideally this should be at the test suite level. But if people have different project structures, we may have to consider providing this at scenario level as well. |
As an example, if we take the godogs-example from godog, you would like to be able to run that example from another folder like the root-folder in the repository? |
Right.. |
Came here looking for it, it is specially helpful if you want to have a Interestingly, I have misunderstood the
|
needing to put the step definition "xxx_test.go" files in the root directory imho violates established golang structure principles. godog should find those files where the |
To better distinguish "bdd step definitions" and "regular test files", I started prefixing step-definitions with |
Go does not restrict the user on where the |
any suggestions? |
I would suggest to consider using standard https://github.com/cucumber/godog#running-godog-with-go-test This way you can leverage full power of standard Go and import step definitions and/or initialization facades from any relevant places of your codebase. |
I have the following project structure
with the above project structure when I run
godog run tests/features/
it doesn't detect the step definitions already defined in thebdd_demo/tests/first_steps.go
If there is no capability to detect, then there should be a command line flag or option to specify the location of the step definitions root directory.
The text was updated successfully, but these errors were encountered: