Run single Cucumber test with Geb

409 views
Skip to first unread message

Rasmus Hovendal

unread,
Oct 12, 2017, 8:44:57 AM10/12/17
to Geb User Mailing List
Hi all,

Following the example from https://github.com/geb/geb-example-cucumber-jvm I have a running gradle/cucumber/geb setup, that works beautifully.
As the amount of cucumber features increases it would be really to nice to be able to execute a single feature using the gradle task.

I'm using ./gradlew cucumber to run alle features - using gradle 4.1.

Thanks!

Rasmus Hovendal

unread,
Oct 12, 2017, 8:46:35 AM10/12/17
to Geb User Mailing List
The preferred way would be to apply som flag/env. variable to gradle. Like ./gradlew -Denv.feature myFeature1 cucumber or something in that manner...

Marcin Erdmann

unread,
Oct 12, 2017, 8:50:42 AM10/12/17
to Geb User Mailing List
Asking in whatever is the support channel for the cucumber plugin used in that example project (https://github.com/samueltbrown/gradle-cucumber-plugin) will probably yield a better chance of getting an answer to your question.

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+unsubscribe@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/38cefec4-ba02-4e31-a928-2b18467aecb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rasmus Hovendal

unread,
Oct 13, 2017, 3:44:57 AM10/13/17
to geb-...@googlegroups.com
Sounds reasonable - i'll try that. Thanks for replying and sorry for posting in wrong mailing list :)

--
You received this message because you are subscribed to a topic in the Google Groups "Geb User Mailing List" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/geb-user/TBnxaH8MXCg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to geb-user+unsubscribe@googlegroups.com.

To post to this group, send email to geb-...@googlegroups.com.

Marcin Erdmann

unread,
Oct 13, 2017, 7:40:44 AM10/13/17
to Geb User Mailing List
No worries and good luck.

Sanjay Reddy

unread,
Jan 20, 2022, 7:49:38 PM1/20/22
to Geb User Mailing List

Hi All,

I am trying to implement geb cucumber for my project with gradle 6.8.3 and groovy 2.5.14 and geb 4.1 and using the setting from
https://github.com/geb/geb-example-cucumber-jvm/blob/master/build.gradle

1. Getting below exception, please hlep me fixing this issue:

An exception occurred applying plugin request [id: 'com.github.samueltbrown.cucumber', version: '0.9']

Failed to apply plugin 'com.github.samueltbrown.cucumber'.
Could not create an instance of type com.excella.gradle.cucumber.CucumberJvmOptions.
> Could not find matching constructor for: org.gradle.process.internal.DefaultJavaForkOptions(org.gradle.api.internal.file.BaseDirFileResolver)


2. If any one found the solution to execute single feature then request you to please share.


Marcin Erdmann

unread,
Jan 22, 2022, 6:44:25 AM1/22/22
to geb-...@googlegroups.com
Hey Sanjay,

The plugin that fails to apply is very old and unmaintained - it looks that the last release was in 2015. I doubt that it will ever work with a modern version of Gradle. The sample you linked to is using Gradle 4 and I've stopped maintaining it because the low interest in using Geb with Cucumber does not justify the effort I would need to put in to find an alternative plugin and then update the sample.

You basically have to options:
- stick to Gradle 4
- find an alternative Gradle plugin for Cucumber and then switch to using that

Note that as I said, the use of Geb with Cucumber seems to be fairly low so you would be in somehow uncharted territory if you went for that combination.

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/cd1737c9-b69f-4bfa-8774-d0f76aa747cfn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages