IntelliJ with cucumber (java) and location

Ok, so I am working on a project using IntelliJ and trying to take advantage of its cucumber functionality. I did not work with the java flavor of cucumber, but IntelliJ seems to want step definition files in a specific place compared to function files.

I found this: how to locate the step definitions for a cucumber in intelliJ 12 and other sources that indicated to me that I was able to add the β€œglue” property of mine which tell cuke that package to find the step file. Therefore, I am at a point where I can run my tests through IDEA. BUT I need to set this every time I run a new test, since Ctrl + Alt + F10 or right-clicking + the start test does not start the test using this flag. In addition, ide support is screwed, since IDEA does not know where the stages are, it is not auto-negotiated, or Ctrl + Click proceeds to the steps.

Is there a way that the IDEA project always looks for steps in this package both when starting tests and for its automatic completion?

+4
source share
4 answers

Creating a self-answer for others who may have this problem. There were no steps in my project that were marked as the source root of the test, and although I did this, I only closed and re-opened my project so that they were matched. So the simple answer was my answer.

+7
source

Go File-> Settings β†’ plugins. Then you can control the cucumber plugin as shown below. This should redirect you to determine the step when clicking on your test.

enter image description here

Hope this helps

+4
source

You can set the glue location globally by opening β€œEdit Configurations β†’ Default β†’ Java Cucumber β†’ Glue” and add the package names.

(IntelliJ 12.1.4)

+3
source

IntelliJ supports the plugin for Cucumber-Java / Groovy . Installing this plugin will allow you to move from the steps mentioned in the function file to step definitions.

enter image description here

And after creating Step Definition, navigation is easy.

enter image description here

+2
source

All Articles