TB2::Formatter::SimpleHTML - A very simple HTML formatter
use Test::Builder2; use TB2::Formatter::SimpleHTML; my $tb2 = Test::Builder2->default; my $ec = $tb2->test_state; $ec->clear_formatters; # remove the TAP formatter $ec->add_formatters( # add the SimpleHTML formatter TB2::Formatter::SimpleHTML->new ); $tb2->test_start; $tb2->ok(1, "a name"); $tb2->ok(0, "another name"); $tb2->ok(1); $tb2->test_end;
This is a very, very simple HTML formatter to demonstrate how its done.
To install Test::Simple, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Simple
CPAN shell
perl -MCPAN -e shell install Test::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.