Geb and Cucumber

21 views
Skip to first unread message

Mike Hunter

unread,
May 24, 2020, 12:24:23 PM5/24/20
to Geb User Mailing List
A few years back at a previous employer, Geb and Cucumber were used very successfully.  I personally helped build up the solutions so at the time, felt like I knew the in's and out's of the tooling pretty well.  That was back when Java 8 was newer etc. and since moving on - I've not kept up to date with the tools.  

Fast forward, and I'm now currently trying to put together a POC of these tools - however; I'm struggling getting these two tools to work well with latest versions of Groovy, Gradle, Java 11, etc.  Geb's cucumber example still shows Java 8 and Gradle 4.x (from what I can tell it's because of the incompatibilities to various plugins, specifically 'com.github.samueltbrown.cucumber'.  I really like that plugin as it used to always "work".  I attempted to use a different one but didn't have much luck getting it to find the Groovy  glue / env on classpath.  Additionally, I see a few options now for Cucumber / Groovy but I'm not sure which is the better option (given I've been able to get either to work yet).  I've tried both info.cukes:cucumber-groovy:1.2.5 which is used in Geb's cucumber example, and the seemingly newer one, io.cucumber:cucumber-groovy:4.7.1 which I found being used in Cucumber's Gradle example, https://github.com/cucumber/cucumber-java-skeleton.  Additionally, Cucumber Groovy example uses Maven and I wasn't able to figure out or find the Cucumber dependency being used there: https://github.com/cucumber/cucumber-jvm-groovy/blob/master/examples/pom.xml (they're example uses, io.cucumber:cucumber-jvm-groovy:5.1.3-SNAPSHOT).

I've found using Groovy with Cucumber so simple and easy in the past, however; for as long as I can remember, the Cucumber-Groovy implementation has been unsupported for years (https://cucumber.io/docs/installation/), though I've not ran into a problem until now trying to get things working.  I'd also like to keep using Groovy to help push using Geb w/ Spock (which I've got working fine).  I'm just trying to enable re-using the same Geb pages by Cucumber's specs now.

So, in an effort to try and keep this as short as possible - any recommendations / success stories out there using Java 11, Gradle 6+, and Groovy w/ Cucumber?  And if so, what specific versions and plugins are working for you?

Thanks in advance!!

Mick

Marcin Erdmann

unread,
May 27, 2020, 3:54:45 PM5/27/20
to geb-...@googlegroups.com
Mike,

Unfortunately I don't have much experience with cucumber other than maintaining the example project for using Geb with it so I cannot offer any advice on how to get it working with the newer stack you are using. On the other hand, if you do get it working then I would appreciate it if you could feed back what versions and what plugins you ended up using so that I can update the example project. It might be beneficial to others.


> Additionally, Cucumber Groovy example uses Maven and I wasn't able to figure out or find the Cucumber dependency being used there

It looks like automated publishing of versions has been stopped after 4.7.1: https://github.com/cucumber/cucumber-jvm-groovy/commit/30fa9382ba0fa1ac211d1cd263bfce4e2aa791c8 and no releases have been made since. On the other hand there seem to be a lot of activity on the repo lately, so maybe another release is coming soon: https://github.com/cucumber/cucumber-jvm-groovy/commits/master. Indeed: https://github.com/cucumber/cucumber-jvm-groovy/issues/19#issuecomment-634783593.

Thanks,
Marcin

--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/59fe2568-933a-4ca5-ab2a-203135254e50%40googlegroups.com.

Stefan Hildebrandt

unread,
May 27, 2020, 5:04:12 PM5/27/20
to geb-user
Hi Mike,

I have a small example project for testcontainers with an example with geb and cucumber (and testcontainers) using gradle. 


The setup differs to marcins example. The glue code is in 


The style is not very groovy, but I prefere writing typed pages and using it in a fluent api manner. I will try to update/extend the examples within the next days.

regrads Stefan


Reply all
Reply to author
Forward
0 new messages