HTTP::WebTest::Plugin::Delay - Pause before running test


HTTP-WebTest documentation Contained in the HTTP-WebTest distribution.

Index


Code Index:

NAME

Top

HTTP::WebTest::Plugin::Delay - Pause before running test

SYNOPSIS

Top

    plugins = ( ::Delay )

    test_name = Name
        delay = 10
        ....
    end_test

DESCRIPTION

Top

This plugin module lets you specify pauses before running specific tests in the test sequence.

TEST PARAMETERS

Top

delay

Duration of pause (in seconds) before running test.

Allowed values

Any number greater that zero.

COPYRIGHT

Top

SEE ALSO

Top

HTTP::WebTest

HTTP::WebTest::API (HTTP::WebTest::API)

HTTP::WebTest::Plugin

HTTP::WebTest::Plugins (HTTP::WebTest::Plugins)


HTTP-WebTest documentation Contained in the HTTP-WebTest distribution.
# $Id: Delay.pm,v 1.4 2003/03/02 11:52:09 m_ilya Exp $

package HTTP::WebTest::Plugin::Delay;

use strict;
use base qw(HTTP::WebTest::Plugin);

use Time::HiRes qw(sleep);

sub param_types {
    return q(delay scalar);
}

sub prepare_request {
    my $self = shift;

    if(my $delay = $self->test_param('delay')) {
	sleep($delay);
    }
}

1;