The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Test::Health::Harness - Moo object to process output from TAP generating tests

SYNOPSIS

See health_check.pl command line script.

ATTRIBUTES

dir

Directories where the tests to be processed are located.

This is a required, read-only attribute during object creation.

report_file

Full path to the HTML file that will be created.

This is a optional, read-write attribute during object creation, it defaults to "results.html".

_lib

Same function of the parameter lib as described in TAP::Harness new method Pod.

Accepts a scalar value or array ref of scalar values indicating which paths to allowed libraries should be included if Perl tests are executed.

formatter

Holds a reference to TAP::Formatter::HTML, so you can customize it if desired by subclassing this class.

METHODS

get_formatter

Getter for the formatter attribute.

get_dir

Getter for dir attribute.

get_report_file

Getter for the report_file attribute.

set_report_file

Setter for the report_file attribute.

BUILD

Execute validations over the parameter given during object creation.

It dies in case of exceptions.

test_health

Reads and process the tests under the directory defined on dir attribute.

If the tests were executed succesfully (which doesn't mean they have the expected results), the HTML report will be generated independent of the expected results.

If the results are FAIL, it will return the test name and the output filename.

If PASS, the HTML report will be removed (see discard_report method) automatically and it will return undef.

discard_report

Discards the HTML report file.

Generates an error message to STDERR in case of failure.

SEE ALSO

AUTHOR

Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 of Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org>

This file is part of Test-Health distribution.

Test-Health is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Test-Health is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Test-Health. If not, see <http://www.gnu.org/licenses/>.