Skip to content
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

Cant find the cukes #42

Open
YassineFB opened this issue Mar 25, 2015 · 4 comments
Open

Cant find the cukes #42

YassineFB opened this issue Mar 25, 2015 · 4 comments
Assignees
Labels

Comments

@YassineFB
Copy link

Hi,
I am using your plugin to run cucumber tests with my gradle project, but when I specify the path for the cukes.java with the glueDirs variable, it doesn't find the cukes, even though it does find the feature files in the path I specify in featureDirs.
I'm very new to Gradle and Cucumber, but I really dont see why and dont see what I could have forgotten.
Any ideas why ? something that I could have missed ?
Thank you in advance !

@YassineFB
Copy link
Author

When I create an empty folder src/cucumber/, I got this error

Exception in thread "main" java.lang.IllegalArgumentException: Not a file or directory: /path/to/my/project/build/resources/cucumber

I do not have this folder, do not use it at all anywhere in my project, and I specify a completely different path for glueDirs in cucumber configuration in my gradle.build... So absolutely no idea why it is looking for this folder :(

@viphe
Copy link
Collaborator

viphe commented Mar 26, 2015

I believe the glue dir is a package name not a file system path (in java).

For your second error, it sounds like a bug. You might be able to work around it by creating a src/main/java for the time being.

@viphe viphe self-assigned this Mar 26, 2015
@viphe viphe added the bug label Mar 26, 2015
@YassineFB
Copy link
Author

Thank you for your quick reply.
My cukes are actually in a package "my.package.name" in "src/test/java/"
It can't find the cukes no matter what I put in the glueDirs variable.
I've tried src/main/java/, src/main/java/my/package/name, my.package.name, my/package/name, src.main.java...
knowing that my feature files are in src/test/resources/my.package.name, and they're found when I run the test, any ideas what I should in the glueDirs variable in order to make it work with the files on those folders?
Thank you in advance.

@viphe
Copy link
Collaborator

viphe commented Mar 26, 2015

https://github.com/samueltbrown/gradle-cucumber-plugin/blob/master/src/test/resources/com/excella/gradle/cucumber/cucumber_plugin_for_runtime.feature

You will find an example at the link above. Basically, you have to prefix with classpath:. This is standard with Cucumber+Java.

Sorry I should have looked it up yesterday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants