-
Notifications
You must be signed in to change notification settings - Fork 44
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
Running cucumber task - problem with step definitions #46
Comments
+1 The README has confusing and conflicting instructions for where the gradle-cucumber-plugin actually looks for step definitions. Could we please link to a mini project as a complete example? As it happens, StackOverflow's layout is correct: http://stackoverflow.com/a/32906314/5120509 Example: |
// Exclude cucumber tests below when running test, build tasks. // Cucumber tasks. ext.RunFeature = { String definition, String feature -> |
Looking at the code, the default glue dir seems to be src/test/java and the default feature dir seems to be src/test/resources. However, in my own use of the plugin, I generally specify src/cucumber/groovy as the glue dir and src/cucumber/resources/features as the feature dir. My preference is to keep unit tests and acceptance tests in separate source sets. Features will be found from all subdirectories of the feature dir. The original poster had glue code under src/test/java/feature - this would not have been found unless the default dir was overridden, or step definitions were in a 'feature' package. |
Is this still an issue? |
Hi.
I have the path: src/test/resources/feature/... which has *.feature files which are the test files and I have their step definitions in:
src/test/java/feature/...
Before using the cucumber plugin, I could run ./gradlew test and it would run the test successfully.
Now I run ./gradlew cucumber and it finds the tests, but not the step definitions.
Instead, it suggests to implement missing steps with the snippets below(giving examples of how step defs should be)
Why's that? why it doesn't locate the step definitions under the src/test/java/feature.. path?
And how could I change the configuration so it'd work?
In addition, I'd like to know how could I run specific tests which exist under specific folders?
for example,tests which exists in folders of which the names are prefixed with "example"?
All of that using ./gradlew cucumber task!
Is it possible?
Thanks in advance.
The text was updated successfully, but these errors were encountered: