-
Notifications
You must be signed in to change notification settings - Fork 35
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
java.lang.NullPointerException: Cannot invoke method propertyMissing() on null object #15
Comments
Not 100% sure but I guess it is the Another possibility is a missing import in a step file. If you see I hope this helps.. |
I'm getting the exact same issue. And Martin has been kindly trying to help me on the geb mailing list: http://markmail.org/message/ycduw5arw54k5ydz So far unsolved. |
This is what's in my CucumberConfig.groovy file: cucumber {
} |
Hi, two things: could you please try to remove the "test/functional" from glue. That does not work with the plugin since 0.5.0. It will be automatically on the classpath so we can still call the geb stuff from the steps but we don't want cucumber to look in "test/functional" for step or hook code. Adding "test/functional" to the Books_geb example breaks the example with MethodMissing. It is not exactly the same message but I think it should help... if not, it would be great if you could simply email me the source of your grails project (if there is nothing secret about it) so that I can take a look at it. I have already gained some practice tracking down such issues building the plugin. ;-) It is probably just some little detail that needs to be documented. Or may be we are looking at the wrong place and it is an environment problem: I'm testing (using the Books_geb example) with grails 2.0.3/4, geb 0.7.0 and grails-cucumber-0.5.0. What is your environment? |
OMG that made all the difference! Thank you Martin. I removed the "test/features" section from CucumberConfig & changed it to "glue = features" as yours is, and now my tests are running. (Not passing yet, got other issues now! But at least they're running. I did actually have the CucumberConfig file like that initially, but I also had the file structure with everything mixed together. Possibly the combination of correct file structure & correct glue config was required. Thank you so much for your help, Martin! |
Hi Martin, Sorry for the lack of response. This is a pet project and I got side Now that's working I've hit another snag. It doesn't seem possible to use remote { The reason is that the remote plugin requires the remote closure to be Thanks, Steve On 2 June 2012 16:25, Martin Hauner <
|
Hi Steve, moved the compiled step def issue to #17, closing this one. :) |
I'm getting exactly this same error, tried to follow these instructions and still get it. |
I'm using the grails-cucumber plugin in my "jinkies" project. Might be a useful point of reference. Source code here - https://github.com/acuminous/jinkies |
Hi superchris, did you try the suggestions mentioned in the older comments? If so, can you provide a stripped down grails project that I could look at? I'm still working on #17 by the way (.. trying to understand my code I wrote a few month back ;-) too catch compile errors before running the cucumber features. |
FYI - I got this issue in IntelliJ when trying to run an individual test (Shift + F10) because it seems to explicitly name the test in the command executed:
where The workaround, for me, was to re-configure the context (Shift + Ctrl + F10) and select Grails which somehow brings it to recognize that there are new function names. |
I'm getting the problem described in #6
I've started with a completely blank project.
Followed the instructions at https://github.com/hauner/grails-cucumber/wiki/Testing-Grails-with-Cucumber-and-Geb to the point where firefox is launching and the test is failing.
Then I went through and updated geb and selenium to the latest versions - everything still worked.
Finally I updated cucumber from 0.2.3 to 0.5.0 at which point I get the NullPointer...
| Error Error executing script TestApp: java.lang.NullPointerException: Cannot invoke method propertyMissing() on null object (Use --stacktrace to see the full trace)
BuildConfig.groovy
GebConfig.groovy
No CucumberConfig.groovy
StackTrace
The text was updated successfully, but these errors were encountered: