Skip to content

IDE Support

Peter Thomas edited this page Jul 14, 2019 · 34 revisions

Many popular text editors such as Visual Studio Code have support for the Gherkin syntax. Using a Java IDE with Cucumber-JVM support is recommended for the best developer experience. All the options below provide syntax-coloring and the ability to run a test without writing a single line of Java code. And in IntelliJ and Eclipse you will get the JUnit HTML report.

IntelliJ Community Edition

Refer to this video for clear instructions, skip to 3:45 if needed: Getting Started.

  • install only the "Cucumber for Java" plugin and this will automatically prompt you to install the "Gherkin" plugin as well which is required.
  • do NOT install the Substeps IntelliJ Plugin, make sure you un-select it if you see it selected anywhere when it comes to installing a plugin.
  • you will be able to right-click on a *.feature file and run it via the [Run 'Feature:'] menu option
  • you will even able to select a Scenario in the editor view and right-click and run it via the [Run 'Scenario:'] menu option
  • if you see warnings such as Unimplemented substep definition - refer to this ticket

IntelliJ IDEA

  • the needed plugins are already installed, see above for troubleshooting

Eclipse

  • install the free Cucumber-Eclipse plugin from https://cucumber.io/cucumber-eclipse/
  • then you will be able to right-click within any *.feature file and [Run As -> Cucumber Feature]
  • Refer to the Cucumber-Eclipse wiki for more: http://bit.ly/2mDaXeV
  • If you see warnings such as Step 'xxx' does not have a matching glue code or required(..)+ loop did not match anything at input Scenario: - refer to this ticket

Visual Studio Code

Other Useful Links

For Eclipse, you can refer to this nice blog post and video by Joe Colantonio which provides step by step instructions on how to get started using Eclipse (without having to run the "quickstart" command). Use the latest available version of Karate, and also make sure you install the Cucumber-Eclipse plugin !

Another blog post which is a good step-by-step reference is this one by Micha Kops - especially if you use the 'default' maven folder structure instead of the one recommended in the Karate documentation.

And one more up-to-date and useful reference is this step-by-step guide by Andy Knight using Visual Studio Code instead of Eclipse or IntelliJ.