View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Peter Sergeant > Test-BDD-Cucumber-0.50 > Test::BDD::Cucumber::Manual::Architecture


Annotate this POD

View/Report Bugs
Source   Latest Release: Test-BDD-Cucumber-0.56


Test::BDD::Cucumber::Manual::Architecture - Structural Overview


version 0.50


This short document exists to give you an idea how the different components of this distribution fit together.


The core of a Cucumber-based test suite are the feature files and the step definitions files. By convention, these are saved under /features/ and /features/step_definitions/ respectively.

The feature files are encapsulated by the classes in Test::BDD::Cucumber::Model.

                  one to one
      |                               |
      +-------------------+           |
      | has many          | has a     | has many
      V                   |           V
 TBCM::Scenario           +----->TBCM::Line
      |                            ^  ^
      +----------------------------+  |
      | has many                      |
      V                               |


We build up a Test::BDD::Executor object, in to which we load the step definitions. We then pass this in a Test::BDD::Model::Feature object, along with a Test::BDD::Model::Harness object, which controls interaction with the outside world.


Extensions allow hooking into the execution of the steps, with pre- and post hooks for steps, scenarios, features and the entire execution. Extensions can provide additional step directories from which steps will be made available. The feature and scenario stashes are passed to the extension hooks allowing for a means of communication between the hooks and the steps.

Extensions - when loaded by the pherkin test executor - receive their configuration from the pherkin.yaml configuration file, which works similar to the configuration of extensions in Behat.


Peter Sergeant


Copyright 2011-2016, Peter Sergeant; Licensed under the same terms as Perl

syntax highlighting: