Kakunin CLI
Allows to create kakunin project much easier.
How to use?
npm install kakunin-cli -g
Create kakunin project
kakunin create-project <path-to-dir-for-kakunin-project> [version]
Project directory can be relative to current directory, absolute or simply .. You can also specify what version of kakunin should be used. By default we use the latest one.
Generate kakunin types
This version of generators works with Kakunin 1.0.0 - latest
Allows you to generate ready-to-fill-in kakunin types files in current directory.
kakunin generate step step-name <Given | When | Then> - creates a file step-name.js with step function of given type Given, When or Then in step_definitions directory.
This function is a ready to go step.
kakunin generate comparator comparator-name - creates a file comparator-name.js with a class ComparatorName in comparators directory.
This class is a ready to go comparator.
kakunin generate dictionary dictionary-name - creates a file dictionary-name.js with a class DictionaryName in dictionaries directory.
This class is a ready to go dictionary and can be used by d:dictionary-name:key.
kakunin generate form-handler form-handler-name - creates a file form-handler-name.js with a class FormHandlerName in form_handlers directory.
This class is a ready to go form handler.
kakunin generate generator generator-name - creates a file generator-name.js with a class GeneratorName in generators directory.
This class is a ready to go generator and can be used by g:generator-name:param1:...:paramN.
kakunin generate hook hook-name <Before | After> - creates a file hook-name.js with hook function of given type Before or After in hooks directory.
This function is a ready to go hook.
kakunin generate matcher matcher-name matcher-prefix - creates a file matcher-name.js with a class MatcherName in matchers directory.
This class is a ready to go matcher and can be used by matcher-prefix:matcher-name.
kakunin generate transformer transformer-name - creates a file transformer-name.js with a class TransformerName in transformers directory.
This class is a ready to go transformer and can be used by transformer-name:value.
Run kakunin tests in any directory
kakunin run [path-to-dir-for-kakunin-project] [-t, --tags] "<cucumber-tags-expression>"
by default it runs a tests from current directory.
Optionally you can specify cucumber tags expression, allowing you to run only a set of scenarios. For example:
kakunin run -t "@wip - runs only a scenarios with @wip tag
kakunin run -t "@wip and @wip2 - runs only a scenarios with both @wip and @wip2 tags
kakunin run -t "@wip or @wip2 - runs only a scenarios with either @wip or @wip2 tag
kakunin run -t "not @wip - runs only a scenarios without @wip tag