Pyhistorian-based BDD tool created in the likeness of Cucumber.
To use PyCukes, you must make sure that you have installed story_runner, Pyhistorian, and PyCukes. By default, PyCukes will look for a 'stories' directory where the stories files are located and a 'step_definitions' directory where your step definitions exist. Conventionally, each story file should end with .story while each step definition should end with steps.py.
For example, suppose you have the directory tree:
|-- calculator
`-- stories
|-- calculator.story
`-- step_definitions
|-- calculator_steps.py
To run your stored stories, you can simply run pycukes. However, if you wish to specify which stories to run, you can call `pycukes stories/calculator.story`.
You may use various parameters with PyCukes:
- -s or --stories-dir: This allows you to specify your stories directory.
- -t or --steps-dir: This helps you specify your step definitions directory.
- -n or --no-colors: This tells PyCukes not to show colored output.
- -n or --colored: This option shows color output in PyCukes.
- -l or --language (en-us by default): This parameter specifies your story language.
In the aforementioned example, you can see how to use PyCukes. Suppose you have a 'bowling_game.story' file and a 'bowling_game_steps.py' file, each located in the stories and step_definitions directory, respectively. In the 'bowling_game.story' file, a story is described as “Bowling Game” with scenario 1 referred to as the “Gutter Game”. In the 'bowling_game_steps.py' file, each step is defined using the 'pycukes' library. Finally, by running pycukes command with the 'hugo@hugo-laptop:~/app$ pycukes stories/bowling_game.story' command, you can obtain the output. The output displays the story, with each step represented by ‘OK’ when it is successfully run, and ‘FAIL’ if a step has not run successfully.
Version 0.1.2: N/A