GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
HTTP::WebTest::Plugins(3) User Contributed Perl Documentation HTTP::WebTest::Plugins(3)

HTTP::WebTest::Plugins - Plugin developers documentation.

Not applicable.

This document is the starting point for developers who wish to extend HTTP::WebTest functionality with external plugins.

Plugin can be used to add new test types and add new report types. A plugin is just a Perl package that defines class with a number of methods which if present are called by HTTP::WebTest at various stages of test.

Each plugin package should subclass HTTP::WebTest::Plugin. Report plugins can subclass HTTP::WebTest::ReportPlugin which is a subclass of HTTP::WebTest::Plugin. HTTP::WebTest::ReportPlugin defines some helper methods useful in report plugins and handles some test parameters common for report plugins.

Each plugin package must provide following method:

Returns

A string that contains information about supported test parameters and their types.

String has following format:

    PARAM1 TYPE1 PARAM2 TYPE2 PARAM3 TYPE3 ... PARAMN TYPEN

PARAM is the name of a test parameter and TYPE is it's type specification. They should be separated by a whitespace character.

Each test parameter type is defined by a method in HTTP::WebTest::Plugin. Type "foobar" is defined as method "check_foobar" in this package. See its documentation for list of all "check_****" methods - these methods define all known test types.

Example

    sub param_types {
        return q(ignore_case   yesno
                 text_forbid   list
                 text_require  list
                 regex_forbid  list
                 regex_require list);
    }

This is from HTTP::WebTest::Plugin::TextMatchTest. It defines the test parameters "ignore_case", "text_forbid", "text_require", "regex_forbid" and "regex_require". "yesno" and "list" are test parameter types.

Each plugin package may provide following methods:

Called before runing test sequence. Initializations can be done in this method. Report plugins can use this hook to create the report header.

Called when test sequence is finished. Clean-up and finalization can be done in this method. Report plugins can use this hook to finish the report.

Called just before HTTP::WebTest submits the HTTP request. Various properties of request can be set here.

Called after HTTP::WebTest gets the HTTP response. Web page tests should be placed here.

Called after all HTTP::WebTest <check_response> hooks are called. Normally used by report plugins to generate report about test just done.

Returns

These methods should return results of tests made in the following form:

    [ [ TEST_GROUP1_NAME, TEST_RESULT1, TEST_RESULT2, ... ],
      [ TEST_GROUP2_NAME, TEST_RESULT1, TEST_RESULT2, ... ],
      ...
    ];

"TEST_GROUP_NAME" is a string that describes a group of web tests and their results. It is used during the generation of the test report.

"TEST_RESULT" is an HTTP::WebTest::TestResult object.

Some examples of plugins are:
HTTP::WebTest::Plugin::Cookies
Plugin that uses both "prepare_request" and "check_response" hooks.
HTTP::WebTest::Plugin::StatusTest
Simple plugin that defines only the "check_response" hook.
HTTP::WebTest::Plugin::DefaultReport
Example of a report plugin. Uses "start_tests", "report_test" and "end_tests" hooks.

Copyright (c) 2001-2003 Ilya Martynov. All rights reserved.

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

HTTP::WebTest

HTTP::WebTest::API

HTTP::WebTest::Plugin

HTTP::WebTest::ReportPlugin

2003-03-02 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.