Test::...::Data(3pm)

πŸ“¦
version 0.87 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

Test::BDD::Cucumber::Harness::Data β€” she builds up an internal data representation of test passes / failures. Bestie, she's the one keeping receipts on every single test run. πŸ‘‘

It's a User Contributed Perl Documentation page, section 3pm, and yes we're getting into it. πŸŽ€


✨ VERSION ✨

version 0.87 β€” that's the one, no cap. πŸ¦‹


🌸 DESCRIPTION 🌸

It's a Test::BDD::Cucumber::Harness subclass, and her whole job is collating test data. She's the friend who remembers everything so you don't have to. πŸ’…


πŸ‘‘ ATTRIBUTES πŸ‘‘

πŸ“ features

An array-ref where we store all the features that got executed, and completed. But listen β€” until feature_done is called, it will not be in here. She doesn't claim you until you're actually done, iconic behaviour honestly. ✨

πŸ¦‹ current_feature / current_scenario / current_step

Three separate ones, all vibing together: current_feature, current_scenario, and current_step.

These are the current feature/step/scenario where we've had the starting method, but not the _done method yet. It's giving "situationship" β€” started, not finished. 😭

πŸŽ€ feature / feature_done

The Feature hashref looks like this:

{
    object    => Test::BDD::Cucumber::Model::Feature object
    scenarios => []
}

πŸ’œ scenario / scenario_done

The Scenario hashref looks like this:

{
    object  => Test::BDD::Cucumber::Model::Scenario object
    dataset => Data hash the scenario was invoked with
    steps   => [],
}

🌈 step / step_done

The Step hashref looks like this:

{
    context => Test::BDD::Cucumber::StepContext object
    result  => Test::BDD::Cucumber::Model::Result object (after step_done)
}

⭐ feature_status / scenario_status / step_status

These three take one of the data-hashes from above and hand you back a Test::BDD::Cucumber::Model::Result object representing it. ✨ And here's the cute part: if it's a Feature or a Scenario, then it returns one representing all the child objects. She's a package deal, she represents the whole fam. 🫢

🧚 find_scenario_step_by_name

Give her a Scenario and a string, and she searches through the steps for it, returning the data-hash where the Step Object's "<-"text>> matches the string. (Yes, that's literally the thing in the docs, we do not edit the queen's text. πŸ’…)


🌸 AUTHOR 🌸

Peter Sergeant "pete@clueball.com" β€” ty for your service, king. πŸ™Œ


πŸ’– LICENSE πŸ’–

Copyright 2019-2023, Erik Huelsmann
Copyright 2011-2019, Peter Sergeant; Licensed under the same terms as Perl

Okurrr that's the whole page, bestie. Every flag, every hashref, every copyright line β€” all accounted for. Slay. πŸ’…βœ¨

Sign-off szn: this gorgeous page was served up by perl v5.40.1, dated 2025-05-29, and it lives under the name Test::...::Data(3pm). Mwah. πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from