4

Is there a Visual Studio Code extension that will write cucumber step definitions?

For example, with IntelliJ if I type

When I login as "fred" with password "barney"

into a feature, then press alt-enter on the undefined step, IntelliJ will auto-generate

When(/^I login as "([^"]*)" with password "([^"]*)"$/) do |arg1, arg2|
  pending
end

in one of my step definition files.

Can Visual Studio Code do this also? (I do have Cucumber Full Support installed; but, it seems to only autocomplete existing steps.)

Zack
  • 6,232
  • 8
  • 38
  • 68

4 Answers4

2

So far as I see Cucumebr VS Code extension does not provides auto-generation/update of test steps as IntelliJ or SpecFlow.

1

Yes, use the SpecFlow plugin from SpecFlow and it will automatically generate all your cucumber feature steps.

John J Smith
  • 11,435
  • 9
  • 53
  • 72
1

Try Jest cucumber for auto-generation of code from feature file- https://marketplace.visualstudio.com/items?itemName=Piotr-Porzuczek.jest-cucumber-code-generator-extension

  • 1
    Links can become invalid in the future, consider adding some quotations from the link you posted, and then refer to it – zhisme Jan 18 '21 at 08:10
-1

There is Cucumber (Gherkin) Full Support plugin. It has auto-completion of steps, as well as many other features.

Mate Mrše
  • 7,997
  • 10
  • 40
  • 77