.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Test::BDD::Cucumber::Extension 3pm" .TH Test::BDD::Cucumber::Extension 3pm "2023-08-29" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Test::BDD::Cucumber::Extension \- Abstract superclass for extensions .SH "VERSION" .IX Header "VERSION" version 0.86 .SH "DESCRIPTION" .IX Header "DESCRIPTION" Provides an abstract superclass for extensions. Loaded extensions will have their hook-implementations triggered at specific points during the \s-1BDD\s0 script execution. .SH "PROPERTIES" .IX Header "PROPERTIES" .SS "config" .IX Subsection "config" A hash, the configuration read from the config file, verbatim. Extensions should look for their own configuration in \f(CW$self\fR\->config\->{extensions}\->{} .SH "METHODS" .IX Header "METHODS" .SS "\fBsteps_directories()\fP" .IX Subsection "steps_directories()" The returns an arrayref whose values enumerate directories (relative to the directory of the extension) which hold step files to be loaded when the extension is loaded. .SS "pre_execute($app)" .IX Subsection "pre_execute($app)" Invoked by \f(CW\*(C`App::pherkin\*(C'\fR before executing any features. This callback allows generic extension setup. Reports errors by calling \fBcroak()\fR. It is called once per \f(CW\*(C`App::pherkin\*(C'\fR instance. .PP Note that the \f(CW\*(C`TAP::Parser::SourceHandler::Feature\*(C'\fR plugin for \f(CW\*(C`prove\*(C'\fR might instantiate multiple \f(CW\*(C`App::pherkin\*(C'\fR objects, meaning it will create multiple instances of the extensions too. As such, this callback may be called once per instance, but multiple times in a Perl image. .PP The source handler \f(CW\*(C`fork\*(C'\fRs the running Perl instance in order to support the parallel testing \f(CW\*(C`\-j\*(C'\fR option. This callback will be called pre-fork. .SS "\fBpost_execute()\fP" .IX Subsection "post_execute()" Invoked by \f(CW\*(C`App::pherkin\*(C'\fR after executing all features. This callback allows generic extension teardown and cleanup. Reports errors by calling \&\fBcroak()\fR. .PP Note: When the \f(CW\*(C`TAP::Parser::SourceHandler::Feature\*(C'\fR plugin for \f(CW\*(C`prove\*(C'\fR is used, there are no guarantees at this point that this hook is called only once. .ie n .SS "pre_feature($feature, $feature_stash)" .el .SS "pre_feature($feature, \f(CW$feature_stash\fP)" .IX Subsection "pre_feature($feature, $feature_stash)" Invoked by the Executor before executing the background and feature scenarios and their respective pre-hooks. Reports errors by calling \fBcroak()\fR. .ie n .SS "post_feature($feature, $feature_stash)" .el .SS "post_feature($feature, \f(CW$feature_stash\fP)" .IX Subsection "post_feature($feature, $feature_stash)" Invoked by the Executor after executing the background and feature scenarios and their respective post-hooks. Reports errors by calling \fBcroak()\fR. .ie n .SS "pre_scenario($scenario, $feature_stash, $scenario_stash)" .el .SS "pre_scenario($scenario, \f(CW$feature_stash\fP, \f(CW$scenario_stash\fP)" .IX Subsection "pre_scenario($scenario, $feature_stash, $scenario_stash)" Invoked by the Executor before executing the steps in \f(CW$scenario\fR and their respective pre-hooks. Reports errors by calling \fBcroak()\fR. .ie n .SS "post_scenario($scenario, $feature_stash, $scenario_stash, $failed)" .el .SS "post_scenario($scenario, \f(CW$feature_stash\fP, \f(CW$scenario_stash\fP, \f(CW$failed\fP)" .IX Subsection "post_scenario($scenario, $feature_stash, $scenario_stash, $failed)" Invoked by the Executor after executing all the steps in \f(CW$scenario\fR and their respective post-hooks. Reports errors by calling \fBcroak()\fR. .PP \&\f(CW$failure\fR indicates whether any of the steps in the scenario has failed. .ie n .SS "pre_step($stepdef, $step_context)" .el .SS "pre_step($stepdef, \f(CW$step_context\fP)" .IX Subsection "pre_step($stepdef, $step_context)" Invoked by the Executor before executing each step in \f(CW$scenario\fR. Reports errors by calling \fBcroak()\fR. .PP \&\f(CW$stepdef\fR contains a reference to an array with step data: .PP .Vb 1 \& [ qr//, { meta => $data }, $code ] .Ve .PP Feature and scenario stashes can be reached through .PP .Vb 3 \& $step_context\->stash\->{feature} \& # and \& $step_context\->stash\->{scenario} .Ve .PP Feature, scenario and step (from the feature file) are available as .PP .Vb 3 \& $step_context\->feature \& $step_context\->scenario \& $step_context\->step .Ve .PP Note: \fBexecuted\fR steps, so not called for skipped steps. .ie n .SS "post_step($stepdef, $step_context, $failed, $result)" .el .SS "post_step($stepdef, \f(CW$step_context\fP, \f(CW$failed\fP, \f(CW$result\fP)" .IX Subsection "post_step($stepdef, $step_context, $failed, $result)" Invoked by the Executor after each executed step in \f(CW$scenario\fR. Reports errors by calling \fBcroak()\fR. .PP \&\f(CW$failed\fR indicates that the step has not been completed successfully; this means the step can have failed, be marked as \s-1TODO\s0 or pending (not implemented). .PP \&\f(CW$result\fR is a \f(CW\*(C`Test::BDD::Cucumber::Model::Result\*(C'\fR instance which holds the completion status of the step. .PP Note: \fBexecuted\fR steps, so not called for skipped steps. .SH "AUTHOR" .IX Header "AUTHOR" Erik Huelsmann \f(CW\*(C`ehuels@gmail.com\*(C'\fR .SH "LICENSE" .IX Header "LICENSE" .Vb 1 \& Copyright 2016\-2023, Erik Huelsmann; Licensed under the same terms as Perl .Ve