App-Test-Generator
view release on metacpan or search on metacpan
one stub listing all variants â one good test kills them all.
Boundary value suggestions are generated for numeric mutations,
clamped and deduplicated for non-negative contexts such as
scalar() and length(). Environment variable hints are added where
the source line references $ENV{...}. The enclosing subroutine
name is shown in each stub for navigation context. File is skipped
if there are no survivors or low-difficulty hints to report.
- LCSAJ path dots on per-file mutation pages are now coloured blue
(covered) or red (not covered), based on whether any line in the
path range was executed during testing. Uncovered paths show
[NOT COVERED] in the hover tooltip. The LCSAJ legend is updated
to explain both colours.
- Replaced TER3-only column in mutation files table with a
TER1 / TER2 / TER3 triple, each component shown as a
colour-coded badge (green/yellow/red). TER1=Statement,
TER2=Branch, TER3=LCSAJ path coverage. Any component
without data shows a grey n/a badge. Column header carries
a tooltip defining all three metrics.
- Added --generate_test=mutant option to generate_index.pl (used
alongside --generate_mutant_tests=DIR). For NUM_BOUNDARY survivors,
attempts to produce a runnable YAML schema file in t/conf/ using
bin/test-generator-index view on Meta::CPAN
}
my $timestamp = 'Unknown';
if(my $stat = stat($config{cover_db})) {
$timestamp = strftime('%Y-%m-%d %H:%M:%S', localtime($stat->mtime));
}
push @html, <<"HTML";
<footer>
<p>Project: <a href="https://github.com/$config{github_user}/$config{github_repo}">$config{github_repo}</a></p>
<p><em>Last updated: $timestamp - <a href="$commit_url">commit <code>$short_sha</code></a></em></p>
</footer>
</body>
</html>
HTML
# Write to index.html
print "Writing output to $config{output}\n" if($config{verbose});
write_file($config{output}, join("\n", @html));
lib/App/Test/Generator/SchemaExtractor.pm view on Meta::CPAN
# $self.
#
# Exit: Returns nothing. Modifies $params
# in place.
#
# Side effects: Logs detections to stdout when
# verbose is set.
#
# Notes: Eight default patterns are tried.
# Only parameters already present in
# $params are updated â this method
# does not add new parameters.
# Falls back to extracting all @_
# assignments if $params is empty
# after the main pass.
# --------------------------------------------------
sub _extract_defaults_from_code {
my ($self, $params, $code, $method) = @_;
# Pattern 1: my $param = value;
while ($code =~ /my\s+\$(\w+)\s*=\s*([^;]+);/g) {
( run in 0.793 second using v1.01-cache-2.11-cpan-39bf76dae61 )