NAME

Test::BDD::Cucumber::Harness::Html - html output for Test::BDD::Cucumber

VERSION

version 1.006

DESCRIPTION

A Test::BDD::Cucumber::Harness subclass that generates html reports.

EXAMPLE USAGE

$ pherkin -o Html features/ > test-report.html

EXAMPLE OUTPUT

The default template uses bootstrap CSS for formatting.

Example test reports from the Test::BDD::Cucumber examples are included in the distribution tar ball or can be viewed online at:

Calculator example

https://markusbenning.de/cucumber-html-examples/calculator-report.html

Digest example

https://markusbenning.de/cucumber-html-examples/digest-report.html

HOW IT WORKS

All report data is gathered and stored in $self->all_features.

For HTML generation a Template style template file is used.

A templated based on bootstrap formating is included in the DATA section of the module an will be used by default.

CONFIGURABLE ATTRIBUTES

fh

A filehandle to write output to; defaults to STDOUT

all_features

An Array holding a data structure with the results.

template_file (default: undef)

A path to a Template Toolkit template file to use for generating the HTML report.

If no path is given the content will be read from the DATA section of the module containing the default template.

template_content (default: undef)

The source code of the Template Toolkit template.

If no content is given it will be read from a file or the DATA section. (see template_file)

title (default: Test Report)

This could be used to set a title for the generated report.

AUTHOR

Markus Benning <ich@markusbenning.de>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Markus Benning.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.