VERSION
Version 0.34
DESCRIPTION
Generates a test strategy plan for all methods in a schema, determining which test types should be produced for each method based on its accessor classification, output type, side effects, and other metadata.
new
Construct a new TestStrategy.
my $strategy = App::Test::Generator::TestStrategy->new(
schema => \%schemas,
thresholds => { confidence => 'high' },
);
Arguments
schemaA hashref of method name to schema hashref. Optional — defaults to an empty hashref.
thresholdsA hashref of threshold configuration. Optional — defaults to
{ confidence => 'medium' }.
Returns
A blessed hashref.
API specification
input
{
schema => { type => HASHREF, optional => 1 },
thresholds => { type => HASHREF, optional => 1 },
}
output
{
type => OBJECT,
isa => 'App::Test::Generator::TestStrategy',
}
generate_plan
Generate a test plan for all methods in the schema and return it as a hashref mapping method names to plan hashrefs.
my $strategy = App::Test::Generator::TestStrategy->new(
schema => \%schemas,
);
my $plan = $strategy->generate_plan;
for my $method (keys %{$plan}) {
print "$method: ", join(', ', keys %{ $plan->{$method} }), "\n";
}
Arguments
None beyond $self.
Returns
A hashref mapping method names to test plan hashrefs, each containing boolean flags for the test types that should be generated.
API specification
input
{
self => { type => OBJECT, isa => 'App::Test::Generator::TestStrategy' },
}
output
{
type => HASHREF,
keys => {
'*' => { type => HASHREF },
},
}
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 69:
Non-ASCII character seen before =encoding in '—'. Assuming UTF-8