VERSION
Version 0.41
new
Construct a new Planner instance.
my $planner = App::Test::Generator::Planner->new(
schemas => \%schemas,
package => 'My::Module',
);
Arguments
schemas- hashref of method name to schema hashref. Required.package- the Perl package name of the module under test. Required.
Returns
A blessed hashref. Croaks if schemas or package is missing.
API specification
input
{
schemas => { type => HASHREF },
package => { type => SCALAR },
}
output
{
type => OBJECT,
isa => 'App::Test::Generator::Planner',
}
plan_all
Generate a test plan for every method in the schema.
my $plans = $planner->plan_all();
Arguments
None beyond $self.
Returns
A hashref mapping method name to a plan hashref. Each plan hashref contains boolean flags such as getter_test, getset_test, object_injection_test, and boolean_test indicating which test types should be emitted for that method.
API specification
input
{
self => { type => OBJECT, isa => 'App::Test::Generator::Planner' },
}
output
{ type => HASHREF }
build_plan
Build a comprehensive test plan by running the schema through all available planning subsystems in sequence: strategy generation, isolation, fixture, mock, and grouping.
my $plan = $planner->build_plan();
Arguments
None beyond $self.
Returns
A hashref with five keys: strategy (from "generate_plan" in App::Test::Generator::TestStrategy), isolation (from "plan" in App::Test::Generator::Planner::Isolation, given the strategy as context), fixture (from "plan" in App::Test::Generator::Planner::Fixture, given the isolation plan as context), mock (from "plan" in App::Test::Generator::Planner::Mock), and groups (from "plan" in App::Test::Generator::Planner::Grouping).
Notes
Unlike plan_all, which is the planner actually used by the test generation pipeline, build_plan is not currently called anywhere else in this distribution. It is kept as a public entry point for the richer combined plan it produces.
API specification
input
{
self => { type => OBJECT, isa => 'App::Test::Generator::Planner' },
}
output
{ type => HASHREF }
AUTHOR
Nigel Horne