.\" 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::Harness 3pm" .TH Test::BDD::Cucumber::Harness 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::Harness \- Base class for creating harnesses .SH "VERSION" .IX Header "VERSION" version 0.86 .SH "DESCRIPTION" .IX Header "DESCRIPTION" Harnesses allow your feature files to be executed while telling the outside world about how the testing is going, and what's being tested. This is a base class for creating new harnesses. You can see Test::BDD::Cucumber::Harness::TermColor and Test::BDD::Cucumber::Harness::TAP for examples, although if you need to interact with the results in a more exciting way, you'd be best off interacting with Test::BDD::Cucumber::Harness::Data. .SH "METHODS / EVENTS" .IX Header "METHODS / EVENTS" .SS "feature" .IX Subsection "feature" .SS "feature_done" .IX Subsection "feature_done" Called at the start and end of feature execution respectively. Both methods accept a single argument of a Test::BDD::Cucumber::Model::Feature. .SS "background" .IX Subsection "background" .SS "background_done" .IX Subsection "background_done" If you have a background section, then we execute it as a quasi-scenario step before each scenario. These hooks are fired before and after that, and passed in the Test::BDD::Cucumber::Model::Scenario that represents the Background section, and a a dataset hash (although why would you use that?) .SS "scenario" .IX Subsection "scenario" .SS "scenario_done" .IX Subsection "scenario_done" Called at the start and end of scenario execution respectively. Both methods accept a Test::BDD::Cucumber::Model::Scenario module and a dataset hash. .SS "step" .IX Subsection "step" .SS "step_done" .IX Subsection "step_done" Called at the start and end of step execution respectively. Both methods accept a Test::BDD::Cucumber::StepContext object. \f(CW\*(C`step_done\*(C'\fR also accepts a Test::BDD::Cucumber::Model::Result object and an arrayref of arrayrefs with locations of consolidated matches, for highlighting. .PP .Vb 1 \& [ [2,5], [7,9] ] .Ve .SS "sub_step" .IX Subsection "sub_step" .SS "sub_step_done" .IX Subsection "sub_step_done" As per \f(CW\*(C`step\*(C'\fR and \f(CW\*(C`step_done\*(C'\fR, but for steps that have been called from other steps. None of the included harnesses respond to these methods, because generally the whole thing should be transparent, and the parent step handles passes, failures, etc. .SS "startup" .IX Subsection "startup" .SS "shutdown" .IX Subsection "shutdown" Some tests will run one feature, some will run many. For this reason, you may have harnesses that have something they need to do on start (print an \s-1HTML\s0 header), that they shouldn't do at the start of every feature, or a close-down task (like running \f(CW\*(C`done_testing()\*(C'\fR), that again shouldn't happen on \fIevery\fR feature close-out, just the last. .PP Just \f(CW$self\fR as the single argument for both. .SS "add_result" .IX Subsection "add_result" Called before \f(CW\*(C`step_done\*(C'\fR with the step's result. Expected to silently add the result in to a pool that facilitate the \f(CW\*(C`result\*(C'\fR method. No need to override this behaviour. .SS "result" .IX Subsection "result" Returns a collective view on the passing status of all steps run so far, as a Test::BDD::Cucumber::Model::Result object. Default implementation should be fine for all your needs. .SH "AUTHOR" .IX Header "AUTHOR" Peter Sergeant \f(CW\*(C`pete@clueball.com\*(C'\fR .SH "LICENSE" .IX Header "LICENSE" .Vb 2 \& Copyright 2019\-2023, Erik Huelsmann \& Copyright 2011\-2019, Peter Sergeant; Licensed under the same terms as Perl .Ve