NAME
App::Test::Generator::LCSAJ::Coverage - Merge LCSAJ path data with runtime hits
VERSION
Version 0.34
DESCRIPTION
Merges static LCSAJ path data produced by App::Test::Generator::LCSAJ with runtime line hit data to determine which LCSAJ paths were covered during test execution. The merged result is written as JSON for consumption by bin/test-generator-index.
merge
Merge a static LCSAJ path JSON file with a runtime line hits JSON file and write the annotated result to an output file.
App::Test::Generator::LCSAJ::Coverage::merge(
'cover_db/lcsaj/MyModule.pm.lcsaj.json',
'cover_db/lcsaj/MyModule.pm.hits.json',
'cover_db/lcsaj/MyModule.pm.covered.json',
);
Arguments
$lcsaj_filePath to the
.lcsaj.jsonfile produced by App::Test::Generator::LCSAJ. Required.$hits_filePath to a JSON file mapping line numbers (as strings) to hit counts, as produced by Devel::App::Test::Generator::LCSAJ::Runtime. Required.
$out_filePath to write the merged output JSON file. Required.
Returns
Nothing. Writes the annotated LCSAJ path data to $out_file, with a covered key added to each path record.
Side effects
Writes to $out_file. Croaks if any file cannot be read or written.
Notes
A path is considered covered if any line in the range start..end was executed at least once. This is a conservative approximation — it does not verify that the jump target was actually reached. As a result, coverage may be slightly overstated for paths where only the beginning of the sequence was executed.
API specification
input
{
lcsaj_file => { type => SCALAR },
hits_file => { type => SCALAR },
out_file => { type => SCALAR },
}
output
{ type => UNDEF }
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 71:
Non-ASCII character seen before =encoding in '—'. Assuming UTF-8