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

NAME

HTTP::WebTest::ReportPlugin - Base class for HTTP::WebTest report plugins.

SYNOPSIS

Not applicable.

DESCRIPTION

This is subclass of HTTP::WebTest. HTTP::WebTest report plugin classes can subclass this class. It handles some test parameters common to report plugins by providing implementation of method print. See below.

TEST PARAMETERS

output_ref

A reference on scalar which accumulates text of test report. This parameter make sense only in Perl scripts.

fh_out

A filehandle (or anything else that supports print) to use for test report output. This parameter make sense only in Perl scripts.

mail_addresses

A list of e-mail addresses where report will be send (if sending report is enabled with mail test parameter).

mail

Option to e-mail output to one or more addresses specified by mail_addresses test parameter.

  • all

    Send e-mail containing test results.

  • errors

    Send e-mail only if one or more tests fails.

  • no

    Do not send e-mail.

Default value

no

mail_server

Fully-qualified name of of the mail server (e.g., mailhost.mycompany.com).

Default value

localhost

mail_from

Sets From: header for report e-mails.

Default Value

Name of user under which test script runs.

CLASS METHODS

test_output

Returns

Returns a reference to buffer which stores copy of test output.

Prints data in <@array> either into string (if test parameter output_ref is set) or to some filehandle (if test parameter fh_out is set) or to standard output.

Also stores this data into buffer accessible via method test_output.

start_tests

This method is called by HTTP::WebTest at the begin of test run. Its implementation in this class inits output buffer for test report.

If you redefine this method in subclass be sure to call it in new method:

    sub start_tests {
        my $self = shift;

        $self->SUPER::start_tests;

        # your code here
        ....
    }

end_tests

This method is called by HTTP::WebTest at the end of test run. Its implementation in this class can email test report according test parameters mail***.

If you redefine this method in subclass be sure to call it in new method:

    sub end_tests {
        my $self = shift;

        # your code here
        ....

        $self->SUPER::end_tests;
    }

COPYRIGHT

Copyright (c) 2001,2002 Ilya Martynov. All rights reserved.

This module is free software. It may be used, redistributed and/or modified under the terms of the Perl Artistic License.

SEE ALSO

HTTP::WebTest

HTTP::WebTest::Plugins

HTTP::WebTest::Plugin

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 67:

You forgot a '=back' before '=head3'

Around line 71:

=back without =over