|
NAMEHTTP::WebTest::SelfTest - Helper package for HTTP::WebTest test suiteSYNOPSISuse HTTP::WebTest::SelfTest; DESCRIPTIONThis 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.GLOBAL VARIABLESThis module imports in namespace of test script following global variables.$HOSTNAMEThe hostname of the test webserver.$PORTThe port of the test webserver.$URLThe URL of the test webserer.SUBROUTINESThis module imports in namespace of test script following helper subroutines.abs_url($base, $rel)ReturnReturns absolute URL based on pair of base and relative URLs. read_file($filename, $ignore_errors)Reads a file.Parameters
Returns Whole content of the file as a string. write_file($filename, $data)Writes into a file.Parameters
check_webtest(%params)Runs a test sequence and compares output with a reference file.Parameters
generate_testfile(%params)Generates test file from template file. I.e. it replaces substring '<<SERVER_URL>>' with value of named parameter "server_url".Parameters
canonical_output(%params)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
compare_output(%params)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
parse_basic_credentials($credentials)Decodes credentials for Basic authorization scheme according RFC2617.Returns Returns user/password pair. DEPRECATED SUBROUTINESThis module imports in namespace of test script following helper subroutines but they are deprecated and may be removed in the future from this module.start_webserverThis subroutine was moved into HTTP::WebTest::Utils but for backward compatibility purposes can be exported from this module.stop_webserverThis subroutine was moved into HTTP::WebTest::Utils but for backward compatibility purposes can be exported from this module.COPYRIGHTCopyright (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. SEE ALSOHTTP::WebTestHTTP::WebTest::API HTTP::WebTest::Plugins
Visit the GSP FreeBSD Man Page Interface. |