1

I have feature file written in gherkin and step definition written in javascript. I am using IntelliJ. I am not able to navigate to the step definition, it shows 'Undefined step reference'.

Is there any glue file needed in Cucumber for Javascript, similar to Cucumber in java. If so, how should i write it in javascript?

1 Answer 1

3

IntelliJ is a Java editor. Use WebStorm for Javascript, to jump to step definitions from features. Also make sure that your feature files are under features folder and step definitions are under step_definitions

5
  • Thanks, Nilesh. Yes I used WebStorm and put all my steps definitions under "step_definitions" directory and it worked.
    – Pankaj
    Commented Aug 15, 2016 at 11:47
  • 1
    This is factually incorrect. IntelliJ IDEA has all of the features of WebStorm and also a bunch of other features for additional languages and frameworks. WebStorm is the collection of a subset of features supported by IntellIJ IDEA. stackoverflow.com/questions/13827214/…
    – th3morg
    Commented Jun 16, 2017 at 17:31
  • If this was true, why would they sell different licenses?
    – nilesh
    Commented Jun 16, 2017 at 21:41
  • IntelliJ IDEA Ultimate has all of the features of WebStorm, PiCharm and a bunch of other IDE's. The seperate IDE's are cheaper, and more focussed. So if you only need JS and do not need Python or Java, then WebStorm is sufficient. If you do full stack many languages, IntelliJ Ultimate might be the better option
    – Endran
    Commented Dec 1, 2017 at 10:30
  • I have both IntelliJ IDEA ultimate and webstorm licensed versions, however I don't see option to run cucumberjs/mocha tests in IntelliJ run configurations, however I do see them in webstorm
    – nilesh
    Commented Dec 1, 2017 at 18:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.