Skip to content
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

Unable to run cucumber scenarios from within IntelliJ #978

Closed
jhinze opened this issue Oct 20, 2017 · 2 comments
Closed

Unable to run cucumber scenarios from within IntelliJ #978

jhinze opened this issue Oct 20, 2017 · 2 comments

Comments

@jhinze
Copy link

jhinze commented Oct 20, 2017

Hello,

I am unable to run Cucumber scenarios from within IntelliJ with the latest versions of serenity-core and serenitity-cucumber. The scenarios do run via maven. Previously, before the Cucumber-JVM 2.0.0 integration, I was able to run scenarios from within IntelliJ via the provided plugins. I know it is not required but it is helpful to be able to execute scenarios from within IntelliJ when implementing and debugging.

Versions:
serenity-core 1.6.6
serenity-cucumber 1.5.15
Cucumber for Java IntelliJ plugin 173.3302
Gherkin IntelliJ plugin 173.3302

Error:
4413 [main] INFO net.serenitybdd.rest.decorators.request.RequestSpecificationDecorated - No BaseStepListener, GET https://../* not registered.
Exception in thread "main" java.lang.NullPointerException: No BaseStepListener has been registered
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:805)
at net.thucydides.core.steps.StepEventBus.getBaseStepListener(StepEventBus.java:108)
at net.thucydides.core.steps.StepEventBus.testFinished(StepEventBus.java:254)
at cucumber.runtime.SerenityBackend.disposeWorld(SerenityBackend.java:35)
at cucumber.runner.Runner.disposeBackendWorlds(Runner.java:159)
at cucumber.runner.Runner.runPickle(Runner.java:81)
at cucumber.runtime.Runtime.runFeature(Runtime.java:119)
at cucumber.runtime.Runtime.run(Runtime.java:104)
at cucumber.api.cli.Main.run(Main.java:36)
at cucumber.api.cli.Main.main(Main.java:18)

@wakaleo
Copy link
Member

wakaleo commented Oct 23, 2017

Running feature files directly has only ever been possible using the custom Serenity runner (see https://johnfergusonsmart.com/running-cucumber-serenity-feature-files-directly-intellij/). However, the Cucumber integration with IntelliJ currently is not compatible with Cucumber 2.0.x, so it generates an error message when you run it (see https://www.jetbrains.com/help/idea/cucumber.html).

@wakaleo wakaleo closed this as completed Oct 23, 2017
@jhinze
Copy link
Author

jhinze commented Oct 23, 2017

Thanks,
I am able to run features directly from IntelliJ after setting up the configuration described above. Also, IntelliJ now has support for Cucumber 2.0.x. See https://youtrack.jetbrains.com/issue/IDEA-179579

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants