NAME
Dist::Zilla::Plugin::DBIO::CoverageTest - Generate xt/release/coverage.t from a Devel::Cover DB
VERSION
version 0.900004
DESCRIPTION
Gathers an xt/release/coverage.t test that, after a coverage run of dzil test, reads cover_db/ and checks that statement coverage of the modules under lib/ meets a threshold. The threshold is configurable via the coverage_threshold option (default 80).
The test merges the runs of a fresh cover_db/ itself (merge_runs), so a plain coverage run without a prior cover is scored. A missing cover_db/ fails under RELEASE=1 -- a release without a coverage run is a failed release -- and skips otherwise (as do an invalid database, a missing Devel::Cover::DB, or no lib/ file exercised). By default a score below the threshold passes with a diagnostic, so a low-coverage run never blocks dzil test for developers. Set COVERAGE_STRICT=1 or RELEASE=1 in the environment to turn that below-threshold score into a failure. With a threshold of 0 the test is a no-op skip.
[ExtraTests] rewrites the gathered xt/release/coverage.t into t/release-coverage.t, guarded by RELEASE_TESTING. The order of the two plugins in [@DBIO] does not matter, since munging runs after all gathering.
ATTRIBUTES
coverage_threshold
Statement-coverage percentage required for a passing run. Default: 80.
AUTHOR
DBIO Authors
COPYRIGHT AND LICENSE
Copyright (C) 2026 DBIO Authors
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.