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

NAME

HTTP::WebTest::Plugin - Base class for HTTP::WebTest plugins.

SYNOPSYS

Not applicable.

DESCRIPTION

HTTP::WebTest plugin classes can subclass this class. It provides some useful helper methods.

METHODS

new ($webtest)

Constructor.

Returns

A new plugin object which will be used by HTTP::WebTest object $webtest.

webtest

Returns

A HTTP::WebTest object which uses this plugin.

test_param ($param, $default)

Returns

If latest test parameter $param is not defined returns $optional_default or false if it is not defined.

If latest test parameter $param is defined returns it's value.

yesno_test_param ($param, $optional_default)

Returns

If latest test parameter $param is not defined returns $optional_default or false if it is not defined.

If latest test parameter $param is defined returns true if latest test parameter $param is yes. False otherwise.

merge_params ($param, $value, $global_value)

Merges test parameter value with global test parameter value.

Returns

A merged test parameter value.

test_result ($ok, $comment)

Factory method which creates test result object.

Returns

A HTTP::WebTest::TestResult object.

validate_test ($test)

Checks test parameters.

Returns

An array of HTTP::WebTest::TestResult objects.

param_types

Method which should be redefined in subclasses. Returns information about test parameters which are supported by plugin. Used to validate tests.

Returns

An hash reference. Keys are names of test parameters which are supported by plugin. Values are their type.

check_anything ($value)

Returns

Always true.

check_list ($value)

Returns

True if $value is an array reference. False otherwise.

check_string ($value)

Returns

True if $value is a string. False otherwise.

check_stringref ($value)

Returns

True if $value is a string reference. False otherwise.

check_uri ($value)

Returns

True if $value is an URI. False otherwise.

check_hashlist ($value)

Returns

True if $value is a hash reference or an array reference which points to array containing even number of elements. False otherwise.

check_yesno ($value)

Returns

True if $value is either yes or no. False otherwise.

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::ReportPlugin