Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ with cucumber (java) and step definition location

Ok, so I'm working on a project using IntelliJ and trying to take advantage of its cucumber functionality. I've not worked with the java flavour of cucumber, but IntelliJ seems to want the step definition files in a specific location, relative to the feature files.

I found this: how to define step definitions location for cucumber in intelliJ 12 and other sources that pointed me to been able to add the "glue" property of my run configurations which tells cuke which package to find the step file. So I am at a point where I can run my tests via IDEA. BUT I need to set this every time I run a new test, as Ctrl+Alt+F10 or right click+run test will not start the test with this flag. Also, the ide support is screwed as IDEA doesn't know where the steps are, it doesn't auto complte or Ctrl+Click navigate to steps.

Is there a way to the the IDEA project to always look for steps in a given package both when running the tests and for its auto complete?

like image 468
Owen Avatar asked Apr 08 '13 01:04

Owen


1 Answers

Go File->Settings--> plugins

Install Cucumber for Java plugin

Then you can manage cucumber plugin as shown below This should redirect you to step definition when you click your test.

enter image description here

Hope this helps

like image 182
A user Avatar answered Nov 27 '22 22:11

A user