hauner / grails-cucumber

a Cucumber plugin for Grails
https://github.com/hauner/grails-cucumber
63 stars 35 forks source link

compiling step files #17

Closed hauner closed 11 years ago

hauner commented 12 years ago

moved from #15

cressie176:

Hi Martin,

Sorry for the lack of response. This is a pet project and I got side tracked onto real work for a few days. I got it working now too. I'd referenced an older version of the Geb plugin, and also not separated out the steps into a separate cucumber directory.

Now that's working I've hit another snag. It doesn't seem possible to use the grails-remote-control plugin with the cucumber plugin to setup remote test data, e.g.

remote { Book.build() }

The reason is that the remote plugin requires the remote closure to be compiled into a class file, but grails isn't creating class files for the code under test/cucumber. I can workaround by putting the closures below the test/functional source folder, but it's going to be a bit nasty. Any thoughts?

Thanks,

Steve

On 2 June 2012 16:25, Martin Hauner < reply@reply.github.com

wrote:

Not 100% sure but I guess it is the CucumberConfig.groovy file. If you use test/cucumberand test/functional you have to configure this in the config file because the plugin uses test/functional as default now. I have updated the cucumber grails geb article.

Another possibility is a missing import in a step file. If you see GroovyBackend.parse in the callstack, cucumber has a problem parsing a groovy script file (hooks or steps). Spent already a few hours myself looking for this erro a couple of times....

Reply to this email directly or view it on GitHub: https://github.com/hauner/grails-cucumber/issues/15#issuecomment-6078322

hauner commented 12 years ago

Hi Steve,

the plugin would have to do two things

That could be triggered by a "use compiled steps" configuration.

Does not sound too difficult. I will have to look at it...

Martin

hauner commented 12 years ago

considering to use compiled steps by default...