=encoding utf8 =head1 NAME =begin original HTTP::WebTest::Plugins - Plugin developers documentation. =end original HTTP::WebTest::Plugins - Plugin 開発者向けドキュメント =head1 SYNOPSIS =begin original Not applicable. =end original なし. =head1 DESCRIPTION =begin original This document is the starting point for developers who wish to extend L functionality with external plugins. =end original このドキュメントは L を外部プラグインを つかって拡張しようとする開発者のスタート地点です. =head1 ABOUT PLUGINS プラグインについて =begin original Plugin can be used to add new test types and add new report types. A plugin is just a Perl package that defines class with a number of methods which if present are called by L at various stages of test. =end original プラグインは新しいテストタイプやレポートタイプを追加することができます. プラグインはテストの様々な局面で L から 呼び出されるいくつかのメソッドをクラスとして定義している Perl パッケージ にすぎません. =begin original Each plugin package should subclass L. Report plugins can subclass L which is a subclass of L. L defines some helper methods useful in report plugins and handles some test parameters common for report plugins. =end original 各プラグインパッケージは L のサブクラスであるべきです. レポートプラグインは L のサブクラスである L のサブクラス でもよいです. L ではレポートプラグインに役立ついくつかのヘルパーメソッドや レポートプラグインが共通して行うテストパラメータの操作を定義しています. =head1 REQUIRED METHODS (必要なメソッド) =begin original Each plugin package must provide following method: =end original 各プラグインパッケージは以下のメソッドを提供しなければなりません: =head2 param_types =head3 Returns (復帰値) =begin original A string that contains information about supported test parameters and their types. =end original サポートするテストパラメータとその型に関する情報を記述した文字列. =begin original String has following format: =end original 文字列には以下の書式で記述します: PARAM1 TYPE1 PARAM2 TYPE2 PARAM3 TYPE3 ... PARAMN TYPEN =begin original PARAM is the name of a test parameter and TYPE is it's type specification. They should be separated by a whitespace character. =end original PARAM がテストパラメータの名前, TYPE がタイプの指定です. 白空白文字で区切ってください. =begin original Each test parameter type is defined by a method in L. Type C is defined as method C in this package. See its documentation for list of all C methods - these methods define all known test types. =end original 各テストパラメータタイプは L のメソッドとして定義されています. タイプ C は メソッド C として定義されています. 全ての C メソッドの 一覧はそのドキュメント(訳注:おそらく Lのこと)を参照してください. この名前のメソッドはすべて既知のテストタイプとして定義されています. =head3 Example sub param_types { return q(ignore_case yesno text_forbid list text_require list regex_forbid list regex_require list); } =begin original This is from L. It defines the test parameters C, C, C, C and C. C and C are test parameter types. =end original これは L. にあるものです. ここではテストパラメータ C, C, C, C, そして C を定義しています. C 及び C はテストパラメータタイプです. =head1 OPTIONAL METHODS (任意のメソッド) =begin original Each plugin package may provide following methods: =end original 各プラグインパッケージでは以下のメソッド提供することもできます: =head2 start_tests () =begin original Called before runing test sequence. Initializations can be done in this method. Report plugins can use this hook to create the report header. =end original テストシーケンスを実行する前に呼び出されます. このメソッドで 初期化を行うことができます. レポートプラグインではこのメソッドで レポートのヘッダを作ることができます. =head2 end_tests () =begin original Called when test sequence is finished. Clean-up and finalization can be done in this method. Report plugins can use this hook to finish the report. =end original テストシーケンスが終了するときに呼び出されます. このメソッドで クリーンアップや終了処理を行うことができます. レポートプラグインでは このメソッドでレポートを終了させることができます. =head2 prepare_request () =begin original Called just before L submits the HTTP request. Various properties of request can be set here. =end original L が HTTP リクエストを送信する直前に 呼び出されます. リクエストに対する様々な属性をここで設定することができます. =head2 check_response () =begin original Called after L gets the HTTP response. Web page tests should be placed here. =end original L が HTTP レスポンスを受け取った後に 呼び出されます. ウェブページをここでテストします. =head2 report_test () =begin original Called after all L hooks are called. Normally used by report plugins to generate report about test just done. =end original 全ての L フックを呼び終えた 後に呼び出されます. 通常レポートプラグインが今終わったテストに関するレポートを 生成するために使います. =head3 Returns (復帰値) =begin original These methods should return results of tests made in the following form: =end original これらのメソッドではテストの結果を以下の形式で返すべきです: [ [ TEST_GROUP1_NAME, TEST_RESULT1, TEST_RESULT2, ... ], [ TEST_GROUP2_NAME, TEST_RESULT1, TEST_RESULT2, ... ], ... ]; =begin original C is a string that describes a group of web tests and their results. It is used during the generation of the test report. =end original C はウェブテスト及びその結果のグループについて 説明する文字列です. テストレポートの生成に使われます. =begin original C is an L object. =end original C は L オブジェクトです. =head1 EXAMPLES =begin original Some examples of plugins are: =end original プラグインの例を挙げてみます: =over 4 =item L =begin original Plugin that uses both C and C hooks. =end original C 及び C の2つのフックを使っています. =item L =begin original Simple plugin that defines only the C hook. =end original C フックのみを定義している簡単なプラグイン. =item L =begin original Example of a report plugin. Uses C, C and C hooks. =end original レポートプラグインです. C, C, そして C フックを使っています. =back =head1 COPYRIGHT Copyright (c) 2001-2003 Ilya Martynov. All rights reserved. =begin original This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =end original このプログラムはフリーソフトウェアです. このプログラムは Perl 自身と同じ条件下で再配布・改変可能です. =head1 SEE ALSO L L L L