Wednesday, April 13, 2016

Spring injection in cucumber step definition in case of groovy script

Leave a Comment

It's quite convenient to implement step definitions using Groovy Script approach, but in this case it's unclear if it's possible to use Spring injection or not.

In case of Groovy script there's no class, just set of closures, like this:

this.metaClass.mixin(Hooks) this.metaClass.mixin(EN)  Given(~/^we do something$/) { ->     } 

Is there any way to use Spring with Groovy Script?

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment