名前¶
HTTP::WebTest::Plugin::SetRequest - Initializes HTTP request for web test
HTTP::WebTest::Plugin::SetRequest - ウェブテストのための HTTP リクエストの初期化
概要¶
Not Applicable
なし.
説明¶
This plugin initializes the HTTP request for a web test.
このプラグインはウェブテストのための HTTP リクエストを初期化します.
テストパラメータ¶
relative_urls¶
If set to yes
than HTTP-WebTest
supports relative URLs. See test parameter url
for more information.
yes
を設定することで HTTP-WebTest
が相対URL をサポートするように なります. より多くの情報は url
テストパラメータを参照してください.
使用可能な値¶
yes
, no
デフォルト値¶
no
url¶
URL to test.
テストするURL.
If test parameter relative_urls
is set to yes
than URL for each test is treated as relative to the URL in the previous test. URL in the first test is treated as relative to http://localhost
.
テストパラメータ relative_urls
が yes
に設定されているときは 1つ前のテストの URL からの相対URLとして処理されます. 最初のテストでは http://localhost
からの相対として処理されます.
If test parameter relative_urls
is set to no
than each URL is treated as absolute. In this case if schema part of URL is omitted (i.e. URL doesn't start with http://
, ftp://
, etc) then http://
is implied.
テストパラメータ relative_urls
が no
に設定されているときは 絶対URLとして処理されます. この時, URL のスキーマ部分が省略されている 時(つまりURLがhttp://
, ftp://
等で始まっていない時)は http://
が付加されます.
method¶
HTTP request method.
HTTP リクエストメソッド.
See RFC 2616 (HTTP/1.1 protocol).
RFC 2616 (HTTP/1.1 プロトコル)を参照してください.
使用可能な値¶
GET
, POST
デフォルト値¶
GET
http_headers¶
A list of HTTP header/value pairs. Can be used to override default HTTP headers or to add additional HTTP headers.
HTTP ヘッダ/値ペアのリスト. デフォルトの HTTP ヘッダを上書きしたり HTTP ヘッダを追加したりできます.
Example¶
http_headers = ( Accept => text/plain, text/html )
params¶
A list of name/value pairs to be passed as parameters to the URL. (This element is used to test pages that process input from forms.)
URL にパラメータとして渡す名前/値ペアのリスト. (この要素はフォームからの入力を処理するページのテストのために使います.)
If the method key is set to GET
, these pairs are URI-escaped and appended to the requested URL.
method キーに GET
が設定されているのならこれらのペアは URI-エスケープされてリクエストURLに追加されます.
Example (wtscript file):
例 (wtscript ファイル):
url = http://www.hotmail.com/cgi-bin/hmhome
params = ( curmbox
F001 A005
from
HotMail )
generates the HTTP request with URI:
生成される HTTP リクエスト URI:
http://www.hotmail.com/cgi-bin/hmhome?curmbox=F001%20A005&from=HotMail
If the method key is set to POST
, as long as all values are scalars they are URI-escaped and put into content of the HTTP request. application/x-www-form-urlencoded
content type is set for such HTTP request.
もしメソッドキーが POST
に設定されているときは同じように URI-エスケープされ, HTTP リクエストの本体で送られます. この時, HTTP リクエストに application/x-www-form-urlencoded
コンテンツタイプが設定されます.
If the method key is set to POST
, some values may be defined as lists. In this case HTTP::WebTest uses multipart/form-data
content type used for Form-based File Upload
as specified in RFC 1867. Each parameter with list value is treated as file part specification with the following interpretation:
method キーが POST
に設定されているのなら値をリストで定義する こともできます. この時 HTTP::WebTest は RFC 1867 で 仕様化されている フォームベースのファイルアップロード
のために multipart/form-data
コンテンツタイプを使います. リストの核パラメータは 以下の処理を通してファイルパートの指定として扱われます.
( FILE, FILENAME, HEADER => VALUE... )
where
それぞれの意味は以下の通りです.
FILE
The name of a file to open. This file will be read and its content placed in the request.
読み込むファイルの名前. このファイルの中身がリクエストに使われます.
FILENAME
The optional filename to be reported in the request. If it is not specified than basename of
FILE
is used.リクエストで報告する任意のファイル名. 指定されなかったときは
FILE
のベースネームが使われます.HEADER => VALUE
Additional optional headers for file part.
ファイルパートの任意の追加ヘッダ.
Example (wtscript file):
例 (wtscript ファイル):
url = http://www.server.com/upload.pl
method = post
params = ( submit => ok
file => ( '/home/ilya/file.txt', 'myfile.txt' ) )
It generates HTTP request with /home/ilya/file.txt
file included and reported under name myfile.txt
.
これは myfile.txt
という名前で /home/ilya/file.txt
の中身を 送る HTTP リクエストを生成します.
auth¶
A list which contains two elements: userid/password pair to be used for web page access authorization.
ウェブページへのアクセス認証に使うユーザ名/パスワードの2つの要素をもつ リストを指定します.
proxies¶
A list of service name/proxy URL pairs that specify proxy servers to use for requests.
リクエストに使うためのプロキシサーバを指定する サービス名/プロキシURLのペアのリスト.
Example¶
proxies = ( http => http://http_proxy.mycompany.com
ftp => http://ftp_proxy.mycompany.com )
pauth¶
A list which contains two elements: userid/password pair to be used for proxy server access authorization.
2つの要素, プロキシサーバにアクセスするための認証のユーザ名/パスワードの ペアを含むリスト.
user_agent¶
Set the product token that is used to identify the user agent on the network.
ネットワーク上でユーザエージェントを識別するために使われる 製品トークンを設定します.
Default value (デフォルト値)¶
HTTP-WebTest/NN
where NN
is version number of HTTP-WebTest.
NN
は HTTP-WebTest のバージョン番号です.
handle_redirects¶
If set to yes
then HTTP-WebTest automatically follows redirects. It means that you never see HTTP responses with status codes 301 and 302. This feature is disabled if this test parameter is set to no
.
yes
の時 HTTP-WebTest が自動的にリダイレクトをたどります. これによってステータスコード 301 及び 302 の HTTP レスポンスを みることはなくなります. この機能を無効にするにはこのテストパラメータに no
を設定します.
使用可能な値¶
yes
, no
デフォルト値¶
yes
timeout¶
Set the timeout value in seconds.
タイムアウト値を秒で設定します.
デフォルト値¶
180
コピーライト¶
Copyright (c) 2000-2001 Richard Anderson. All rights reserved.
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.
このプログラムはフリーソフトです. このプログラムは Perl 自身と同じ条件下で 再配布・改変可能です.