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

HTTP::WebTest::SelfTest - Helper package for HTTP::WebTest test suite

    use HTTP::WebTest::SelfTest;

This module provides helper routines used by HTTP::WebTest self test suite. Plugin writers may find this module useful for implementation of test suites for their plugins.

This module imports in namespace of test script following global variables.

The hostname of the test webserver.

The port of the test webserver.

The URL of the test webserer.

This module imports in namespace of test script following helper subroutines.

Return

Returns absolute URL based on pair of base and relative URLs.

Reads a file.

Parameters

$filename
Name of the file.
$ignore_errors
(Optional) If true then open file errors are ignored, otherwise they raise an exception. If omit defaults to true.

Returns

Whole content of the file as a string.

Writes into a file.

Parameters

$filename
Name of the file.
$data
Data to write into the file.

Runs a test sequence and compares output with a reference file.

Parameters

webtest => $webtest
HTTP::WebTest object to be used for running the test sequence.
tests => $tests
The test sequence.
tests => $opts
The global parameters for the test sequence.
out_filter => $out_filter

Generates test file from template file. I.e. it replaces substring '<<SERVER_URL>>' with value of named parameter "server_url".

Parameters

file => $file
Filename of test file. Template file is expected to be in file named "$file.in".
server_url => $server_url
Test webserver URL.

Some substrings in test output are unique for each test run. This subroutine "fixes" test output so it becomes repeatable (unless tests get broken).

Parameters

output_ref => $output_ref
A reference on scalar which contains test output as whole string.
out_filter => $out_filter
An optional reference on subroutine which can be used as additional filter. It gets passed test output as its first parameter.
server_url => $server_url
Test webserver URL. Normally it is unique for each test run so it gets replaced with "http://http.web.test/".
server_hostname => $server_hostname
Test webserver URL. Normally it is unique for each machine where test is run so it gets replaced with "http.web.test".

Tests if a test output matches content of specified reference file. If environment variable "TEST_FIX" is set then the test is always succeed and the content of the reference file is overwritten with current test output.

Parameters

output_ref => $output_ref
A reference on scalar which contains test output as whole string.
check_file => $check_file
Filename of the reference file.

Decodes credentials for Basic authorization scheme according RFC2617.

Returns

Returns user/password pair.

This module imports in namespace of test script following helper subroutines but they are deprecated and may be removed in the future from this module.

This subroutine was moved into HTTP::WebTest::Utils but for backward compatibility purposes can be exported from this module.

This subroutine was moved into HTTP::WebTest::Utils but for backward compatibility purposes can be exported from this module.

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

2003-07-14 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.