Search code examples
gocucumberdeclarationgherkingoland

What is the way to glue Cucumber feature steps to their implementation for navigation in Goland?


I'm using godog as a testing framework and Goland as an IDE (with Cucumber and Gherkin plugins installed).

I have features files and steps implementation and the tests work well (steps are found and executed correctly).

I am unable to navigate from steps in a feature file to the matching step declaration. The step is highlighted as undefined step reference and CMD+click invokes the "Cannot find declaration to go to" popup.

Steps are defined as regular expressions if it matters (as mentioned, the steps are found and executed properly, the problem is only with navigation within the IDE).

What can be done to make Goland navigate from a feature step to the relevant step definition?

I looked it up in different forums and saw suggestions for other languages and IDEs but none seem to resolve the issue for Go / Goland.

Thank you! Katya.


Solution

  • It doesn't look like this is currently supported (based on this -https://youtrack.jetbrains.com/issue/GO-5655/Support-for-godog-testing-framework). But you can try using some plugins, like this one: https://plugins.jetbrains.com/plugin/24323-cucumber-go?noRedirect=true .