0

I am new to BDD and Gherkin. Trying to use Cucumber, which parses Gherkin to Ruby - a language I don't know. Is there any library which converts Gherkin to Javascript ? If I get the Javascript output for Gherkin, I plan to modify the code and call some Javascript functions of my own. Please note, I am not planning to test these javascript functions - these functions are from some other testing tool I am trying to chain to. I Hope I am not planning to do something weird. All the problem is that our team does not want to learn Ruby. Please suggest some options.

I guess, what I need is a tool which allows me to write step definitions in javascript - as opposed to Ruby.

Thanks !

dev
  • 11,071
  • 22
  • 74
  • 122

4 Answers4

1

I think you're looking for Cucumber.js: http://git.io/cukejs

jbpros
  • 1,637
  • 1
  • 15
  • 17
0

Gherkin is a human-readable DSL, and cucumber doesn't care what language you use to create the step definitions.

While I don't see any javascript-specific examples on the cucumber wiki, you might want to check out cucumber.js.

orde
  • 5,233
  • 6
  • 31
  • 33
0

Cucumber.js is a good option and Kyuri is a good alternative if you the stuff from nodejitsu :) https://github.com/nodejitsu/kyuri

karolsojko
  • 711
  • 1
  • 8
  • 27
0

You can try a cucumber.js authoring tool, called CukeTest, it has the following relevant feature.

  • Generate JavaScript code from steps text
  • Prompt you whether there are existing/pending/duplicate definition for a step.
  • Given a particular step definition code in JavaScript file, jump to the step definition that matches it
  • Switch from visual editing view to text view

There are both desktop version available, or Windows Store version. Here is a demo:

enter image description here

Lean Prop
  • 111
  • 6