NAME
HTTP::WebTest::Plugin::Apache - Plugin for local web file tests
SYNOPSIS
Not Applicable
DESCRIPTION
This plugin supports local web file test mode. Apache must be installed to run tests in this mode.
APACHE DIRECTORY AND FILES
A tree of directories with templates of Apache config files is required to run local web file tests.
The apache_dir
parameter must be set to the name of a directory that contains the subdirectories conf
, logs
and htdocs
. The conf
subdirectory must contain a file named httpd.conf-dist
. The htdocs
subdirectory must contain a subdirectory named webtest
that contains a file named is_apache_responding.html
. If your installation of Apache has the Perl module Apache::ASP configured, the apache_dir
directory must also contain a subdirectory named asp_tmp
.
The file httpd.conf-dist
is used as template for the Apache config file. It contains tags which are replaced with the values needed by the Apache server that the program starts at runtime.
Please_do_not_modify_PORT
To be replaced with port number on which Apache runs during tests.
Please_do_not_modify_HOST_NAME
To be replace with Apache host name.
Please_do_not_modify_SERVER_ROOT
To be replaced with Apache server root.
Please_do_not_modify_LOG_LEVEL
To be replaced with Apache log level.
TEST PARAMETERS
apache_dir
GLOBAL PARAMETER
Absolute or relative path name of directory containing Apache files. See the APACHE DIRECTORY AND FILES section. This parameter is ignored unless the file_path
parameter is specified.
Default value
/usr/local/etc/http-webtest
apache_exec
GLOBAL PARAMETER
Absolute or relative path name of Apache executable. This command can be in your $PATH
. This parameter is ignored unless the file_path
parameter is specified.
Default value
/usr/sbin/apache
apache_loglevel
GLOBAL PARAMETER
Apache logging level. If you use a level less than warn
(i.e., debug
, info
, or notice
), the program may generate irrelevant errors. This parameter is ignored unless the file_path
parameter is specified. See also the ignore_error_log
parameter.
Allowed values
debug
, info
, notice
, warn
, error
, crit
, alert
, emerg
Default value
warn
apache_max_wait
GLOBAL PARAMETER
Maximum number of seconds to wait for Apache to start. This parameter is ignored unless the file_path
parameter is specified.
Default value
60
apache_options
GLOBAL PARAMETER
Additional Apache command line options. Many of the options cause Apache to exit immediately after starting, so the web page tests will not run. This parameter is ignored unless the file_path
parameter is specified.
Allowed values
See Apache documentation
error_log
GLOBAL PARAMETER
The pathname of a local web server error log. The module counts the number of lines in the error log before and after each request. If the number of lines increases, an error is counted and the additional lines are listed in the report. This argument should be used only when the local web server is running in single-process mode. Otherwise, requests generated by other processes/users may add lines to the error log that are not related to the requests generated by this module. See also parameter ignore_error_log
.
file_path
If HTTP::WebTest encounters parameter file_path
it switches in local web file test mode. In local web file test mode it launches an instance of Apache daemon, copies local test file(s) under DocumentRoot of this Apache and performs test checks against it.
Allowed values
Two-element list. First element is the file to test, either an absolute or a relative pathname. Second element is the subdirectory pathname, relative to the Apache htdocs directory, to copy the file to. The copied file will have the same basename as the first element and the relative pathname of the second element. To copy the file directly to the htdocs directory, use a pathname of .
or ./.
.
ignore_error_log
Option to ignore any errors found in the Apache error log. The default behavior is to flag an error if the fetch causes any errors to be added to the error log and echo the errors to the program output. This check is available only if error_log
parameter is specified. See also the apache_loglevel
parameter.
Allowed values
yes
, no
Default value
no
include_file_path
List with an even number of elements. Odd-numbered elements are files to copy to the the temporary Apache directory before running the tests. These files can be specified using either an absolute or a relative pathname. Even-numbered elements are the subdirectory pathname, relative to the Apache ServerRoot directory, to copy the corresponding file to. The copied file will have the same basename as the odd-numbered element and the relative pathname of the corresponding even-numbered element. To copy the file directly to the ServerRoot directory, use a pathname of .
or ./.
.
For example:
include_file_path = (/home/tester/inc/header.inc => htdocs/includes)
will copy the file to htdocs/includes/header.inc.
This parameter is also useful for adding Perl modules that are needed by the web page specified by the file_path parameter. For example:
include_file_path = ( ../apps/myapp/DBconn.pm => lib/perl/apps )
will copy the Perl module DBconn.pm to a directory that is in the Perl @INC array.
COPYRIGHT
Copyright (c) 2000-2001 Richard Anderson. All rights reserved.
Copyright (c) 2001-2002 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.