There are a few prerequisites before you can use Cucumber.ml:
- Compile and install gherkin-c as a shared object on your system
- Install Opam package manager for OCaml
- Install Dune build system via Opam
Cucumber.ml delegates its Gherkin parsing to the gherkin-c implementation using OCaml’s foreign function interface. This means that, before you can use Cucumber.ml, you will need to compile and install gherkin-c as a shared library with its header files on your system.
Next, check out the Cucumber.ml project and do the following:
dune build && dune install
This will install the
cucumber Opam package into your local Opam
repository. For more information, please read the
Note: Cucumber.ml assumes that once you start executing your step definitions it will control the command line arguments. This can be surprising, so please be aware of it. Basically, the executable created by the compilation process is the Cucumber runner and it is that executable which will run your step definitions.
Please see the Cucumber OCaml website for more information and usage instructions.