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::Plugin::Hooks(3) User Contributed Perl Documentation HTTP::WebTest::Plugin::Hooks(3)

HTTP::WebTest::Plugin::Hooks - Provides callbacks called during test run

    plugins = ( ::Hooks )

    # do some test sequence initialization
    on_start = { My::init() }

    # do some test sequence deinitialization
    on_finish = { My::stop() }

    test_name = Name1
        ....
        # do some test initialization
        on_request = { My::local_init() }
    end_test

    test_name = Name2
        ....
        # define custom test
        on_response = ( { My::test() ? 'yes' : 'no' } => 'My test' )
    end_test

    test_name = Name3
        ....
        # call finalization code with returning any test results
        on_response = { My::finalize(); return [] }
    end_test

This plugin module adds test parameters whose values are evaluated at specific times of the HTTP::WebTest test run. It can be used to do some initialization before doing test request, to do some finalization when test response is received or to implement user defined tests without writing a new plugin module.

The value of this test parameter is ignored. However, it is evaluted before the test sequence is run, so it can be used to do initalization before the test sequence run.

Example

See example in HTTP::WebTest::Cookbook.

The value of this test parameter is ignored. However, it is evaluted before the test sequence is run, so it can be used to run finalization code when the test sequence is finished.

Example

See example in HTTP::WebTest::Cookbook.

The value of this test parameter is ignored. However, it is evaluted before the HTTP request is done, so it can be used to do initalization before the request.

This is a list parameter which is treated as test result. It is evaluted when the HTTP response for the test request is received.

It can be used to define custom tests without writing new plugins. It can also be used to run some code when the HTTP response for the test request is received.

Allowed values

    ( YESNO1, COMMENT1
      YESNO2, COMMENT2
      ....
      YESNON, COMMENTN )

Here "YESNO", "COMMENT" is a test result. "YESNO" is either "yes" if test is successful or "no" if it is not. "COMMENT" is a comment associated with this test.

Example

See example in HTTP::WebTest::Cookbook.

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

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.