argra****@users*****
argra****@users*****
2012年 11月 29日 (木) 22:36:11 JST
Index: docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/API.pod diff -u docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/API.pod:1.2 docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/API.pod:1.3 --- docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/API.pod:1.2 Thu Jan 27 22:14:56 2011 +++ docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/API.pod Thu Nov 29 22:36:11 2012 @@ -2,14 +2,16 @@ =encoding utf8 =head1 NAME -åå‰ + +=begin original HTTP::WebTest::API - API of HTTP::WebTest +=end original + HTTP::WebTest::API - HTTP::WebTest ã® API =head1 SYNOPSIS -æ¦‚è¦ use HTTP::WebTest; @@ -24,72 +26,107 @@ $webtest->run_tests($tests); =head1 DESCRIPTION -説明 + +=begin original This document describes Perl API of C<HTTP::WebTest>. +=end original + ã“ã®ãƒ‰ã‚ュメントã§ã¯ C<HTTP::WebTest> ã® Perl API ã«ã¤ã„㦠記述ã—ã¦ã„ã¾ã™. =head1 METHODS -メソッド + +(メソッド) =head2 new () +=begin original + Constructor. +=end original + コンストラクタ. =head3 Returns -復帰値 + +(復帰値) + +=begin original A new C<HTTP::WebTest> object. +=end original + æ–°ã—ã„ C<HTTP::WebTest> オブジェクト. =head2 run_tests ($tests, $optional_params) +=begin original + Runs a test sequence. +=end original + テストシーケンスã®å®Ÿè¡Œ. =head3 Parameters -パラメータ + +(パラメータ) =over 4 =item * $test +=begin original + A reference to an array that contains test objects. +=end original + ãƒ†ã‚¹ãƒˆã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’æ ¼ç´ã—ãŸé…列ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. =item * $optional_params +=begin original + A reference to a hash that contains optional global parameters for test. +=end original + ä»»æ„ã®ãƒ†ã‚¹ãƒˆã®ãŸã‚ã®ã‚°ãƒãƒ¼ãƒãƒ«ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ã‚’æ ¼ç´ã—ãŸãƒãƒƒã‚·ãƒ¥ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. =back =head2 run_wtscript ($wtscript, $optional_params) +=begin original + Reads wtscript and runs tests it defines. +=end original + wtscript ã‚’èªã¿è¾¼ã¿ãã“ã§å®šç¾©ã•ã‚Œã¦ã„るテストを実行ã™ã‚‹. =head3 Parameters -パラメータ + +(パラメータ) =over 4 =item * $wtscript +=begin original + Either the name of wtscript file or wtscript passed as string. Very simple heuristic is used distinguish first from second. If C<$wtscript> contains either C<\n> or C<\r> it is treated as a wtscript string. Otherwise, it is treated as a file name. +=end original + wtscript ファイルã®åå‰ã‚‚ã—ãã¯wtscriptãã®ã‚‚ã®. ã¨ã¦ã‚‚å˜ç´”ãªæ–¹æ³•ã§ 両指定ã¯è˜åˆ¥ã•ã‚Œã¾ã™. ã‚‚ã— C<$wtscript> ㌠C<\n> ã‚‚ã—ã㯠C<\r> ã‚’ å«ã‚“ã§ã„ã‚Œã°ãれ㯠wtscript æ–‡å—列ã¨ã—ã¦å‡¦ç†ã•ã‚Œã¾ã™. ãã†ã§ãªã‘れ㰠@@ -99,100 +136,150 @@ =back +=begin original + A reference to a hash that contains optional test parameters that can override parameters defined in wtscript. +=end original + wtscript ã§å®šç¾©ã•ã‚Œã¦ã„るパラメータを上書ãã™ã‚‹ä»»æ„ã®ãƒ†ã‚¹ãƒˆãƒ‘ラメータを å«ã‚“ã ãƒãƒƒã‚·ãƒ¥ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. =head2 num_fail () =head3 Returns -復帰値 + +(復帰値) + +=begin original The number of failed tests. +=end original + 失敗ã—ãŸãƒ†ã‚¹ãƒˆã®æ•°. =head2 num_succeed () =head3 Returns -復帰値 + +(復帰値) + +=begin original The number of passed tests. +=end original + æˆåŠŸã—ãŸãƒ†ã‚¹ãƒˆã®æ•°. =head2 have_succeed () =head3 Returns -復帰値 + +(復帰値) + +=begin original True if all tests have passed, false otherwise. +=end original + å…¨ã¦ã®ãƒ†ã‚¹ãƒˆãŒæˆåŠŸã—ãŸã¨ãã«çœŸ, ãã†ã§ãªã‘ã‚Œã°å½. =head2 parser_package($optional_parser_package) +=begin original + If $optional_parser is defined sets a parser package to use when parsing wtscript files. Otherwise just returns current parser package. +=end original + $optional_parser ãŒå®šç¾©ã•ã‚Œã¦ã„れ㰠wtscript ファイルを解æžã™ã‚‹ã¨ã㫠使ã‚れるパーサパッケージã¨ã—ã¦è¨å®šã™ã‚‹. ãã†ã§ãªã‘ã‚Œã°ç¾åœ¨ã®ãƒ‘ーサパッケージを返ã™. =head3 Returns -復帰値 + +(復帰値) + +=begin original The parser package. +=end original + パーサーパッケージ. =head2 parse ($data) +=begin original + Parses test specification in wtscript format. +=end original + wtscript フォーマットã®ãƒ†ã‚¹ãƒˆè¨˜è¿°ã‚’解æžã™ã‚‹. =head3 Parameters -パラメータ + +(パラメータ) =over 4 =item * $data +=begin original + Scalar that contains test specification in wtscript format. +=end original + wtscript フォーマットã®ãƒ†ã‚¹ãƒˆè¨˜è¿°ã‚’å«ã‚“ã スカラー. =back =head3 Returns -復帰値 + +(復帰値) + +=begin original A list of two elements. First element is a reference to an array that contains test objects. Second element is a reference to a hash that contains optional global test parameters. +=end original + ï¼’ã¤ã®è¦ç´ ã‚’æŒã¤ãƒªã‚¹ãƒˆ. 1ã¤ç›®ã¯ãƒ†ã‚¹ãƒˆã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’æ ¼ç´ã—ãŸé…列ã¸ã® リファレンス. ï¼’ã¤ç›®ã¯ä»»æ„ã®ã‚°ãƒãƒ¼ãƒãƒ«ãƒ†ã‚¹ãƒˆãƒ‘ラメータå«ã‚“ã ãƒãƒƒã‚·ãƒ¥ã¸ã® リファレンス. +=begin original + It can be passed directly to C<run_tests>. +=end original + ã“れらã®å€¤ã¯ç›´æŽ¥ C<run_tests> ã«æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™. =head3 Example -例 $webtest->run_tests($webtest->parse($data)); =head1 LOW-LEVEL API METHODS -低レベル API メソッド + +(低レベル API メソッド) + +=begin original Most users don't need to use this part of C<HTTP::WebTest> API directly. It could be useful for users who want to: +=end original + 大抵ã®ãƒ¦ãƒ¼ã‚¶ã¯ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã® C<HTTP::WebTest> API ã‚’ 直接使ã†å¿…è¦ã¯ã‚ã‚Šã¾ã›ã‚“. ã“れらã¯æ¬¡ã®ã“ã¨ã‚’è¡Œã„ãŸã„ユーザã«ã¯ 便利ã§ã—ょã†: @@ -203,19 +290,27 @@ +=begin original + Write an C<HTTP::WebTest> plugin. +=end original + C<HTTP::WebTest> プラグインを書ãã¨ã. =item * +=begin original + Get access to L<LWP::UserAgent|LWP::UserAgent>, L<HTTP::WebTest::Request|HTTP::WebTest::Request>, L<HTTP::Response|HTTP::Response> and other objects used by C<HTTP::WebTest> during runing test sequence. +=end original + L<LWP::UserAgent|LWP::UserAgent>, L<HTTP::WebTest::Request|HTTP::WebTest::Request>, L<HTTP::Response|HTTP::Response> åŠã³ãƒ†ã‚¹ãƒˆã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã®å®Ÿè¡Œä¸ã« @@ -226,19 +321,28 @@ =head2 tests () =head3 Returns -復帰値 + +(復帰値) + +=begin original A reference to an array that contains test objects. +=end original + ãƒ†ã‚¹ãƒˆã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’æ ¼ç´ã™ã‚‹é…列ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. =head2 user_agent ($optional_user_agent) +=begin original + If $optional_user_agent is a user agent object, it is used by the C<HTTP::WebTest> object for all requests. If $optional_user_agent is passed as undef, the HTTP::WebTest object is reset to use the default user agent. +=end original + $optional_user_agent ãŒãƒ¦ãƒ¼ã‚¶ã‚¨ãƒ¼ã‚¸ã‚§ãƒ³ãƒˆã‚ªãƒ–ジェクトã§ã‚れ㰠C<HTTP::WebTest> ã®å…¨ã¦ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã§ãれを使ã†ã‚ˆã†ã«ãªã‚Šã¾ã™. ã‚‚ã— $optional_user_agent ã« undef を渡ã•ã‚ŒãŸãªã‚‰, @@ -246,31 +350,45 @@ リセットã•ã‚Œã¾ã™. =head3 Returns -復帰値 + +(復帰値) + +=begin original The user agent object used by the C<HTTP::WebTest> object. +=end original + C<HTTP::WebTest> オブジェクトã«ã‚ˆã£ã¦ä½¿ã‚れるユーザエージェントオブジェクト. =head2 plugins ($optional_plugins) +=begin original + If C<$optional_plugins> is a reference to an array that contains plugin objects, the C<HTTP::WebTest> object uses these plugins while running tests. If C<$optional_plugins> is passed as undef, the C<HTTP::WebTest> object is reset to use the default set of plugins. +=end original + C<$optional_plugins> ã«ãƒ—ãƒ©ã‚°ã‚¤ãƒ³ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’æ ¼ç´ã—ãŸé…列ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹ を渡ã—ãŸã¨ã㯠C<HTTP::WebTest> ã¯ãƒ†ã‚¹ãƒˆã®å®Ÿè¡Œä¸ã«ãれらã®ãƒ—ラグインを使ã†ã‚ˆã†ã« ãªã‚Šã¾ã™. ã‚‚ã— C<$optional_plugins> ã« undef を渡ã—ãŸã¨ãã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã® プラグインセットã«ãƒªã‚»ãƒƒãƒˆã•ã‚Œã¾ã™. =head3 Returns -復帰値 + +(復帰値) + +=begin original A reference to an array that contains plugin objects. If you add or remove plugin objects in this array, you will change the set of plugins used by C<HTTP::WebTest> object during tests. +=end original + ãƒ—ãƒ©ã‚°ã‚¤ãƒ³ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’æ ¼ç´ã—ãŸé…列ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. ã‚‚ã—ãã®é…列ã®ãƒ—ãƒ©ã‚°ã‚¤ãƒ³ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’è¿½åŠ ã‚‚ã—ãã¯å‰Šé™¤ã™ã‚‹ã¨ テストä¸ã« C<HTTP::WebTest> オブジェクトãŒä½¿ã†ãƒ—ラグインã®ã‚»ãƒƒãƒˆã‚’ @@ -279,203 +397,308 @@ =head2 create_user_agent () =head3 Returns -復帰値 + +(復帰値) + +=begin original A new L<LWP::UserAgent|LWP::UserAgent> object, initialized with default settings. +=end original + デフォルトã®è¨å®šã§åˆæœŸåŒ–ã•ã‚ŒãŸæ–°ã—ã„ L<LWP::UserAgent|LWP::UserAgent> オブジェクト. =head2 reset_user_agent () +=begin original + Resets the user agent to the default. +=end original + ユーザエージェントをデフォルトã®ã‚‚ã®ã«ãƒªã‚»ãƒƒãƒˆã—ã¾ã™. =head2 reset_plugins () +=begin original + Resets the set of plugin objects to the default set. +=end original + プラグインオブジェクトをデフォルトã®ã‚‚ã®ã«ãƒªã‚»ãƒƒãƒˆã—ã¾ã™. =head2 default_plugins () =head3 Returns -復帰値 + +(復帰値) + +=begin original A reference to the set of default plugin objects. +=end original + デフォルトã®ãƒ—ラグインオブジェクトã®ã‚»ãƒƒãƒˆã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. =head2 global_test_param ($param) =head3 Returns -復帰値 + +(復帰値) + +=begin original The value of the global test parameter C<$param>. +=end original + ã‚°ãƒãƒ¼ãƒãƒ«ãƒ†ã‚¹ãƒˆãƒ‘ラメータ C<$param> ã®å€¤. =head2 current_test_num () =head3 Returns -復帰値 + +(復帰値) + +=begin original The number of the current test or, if no test is running, the current test run. +=end original + ç¾åœ¨ã®ãƒ†ã‚¹ãƒˆã®ç•ªå·. ã‚‚ã—ãã¯å®Ÿè¡Œä¸ã§ãªã‘ã‚Œã°æœ€å¾Œã«å®Ÿè¡Œã•ã‚ŒãŸãƒ†ã‚¹ãƒˆã®ç•ªå·. =head2 current_test () =head3 Returns -復帰値 + +(復帰値) + +=begin original The L<HTTP::WebTest::Test|HTTP::WebTest::Test> object which corresponds to the current test or, if no test is running, the current test run. +=end original + ç¾åœ¨ã®ãƒ†ã‚¹ãƒˆã«å¯¾å¿œã™ã‚‹ L<HTTP::WebTest::Test|HTTP::WebTest::Test> オブジェクト. ã‚‚ã—ãã¯å®Ÿè¡Œä¸ã§ãªã‘ã‚Œã°æœ€å¾Œã«å®Ÿè¡Œã•ã‚ŒãŸãƒ†ã‚¹ãƒˆã‚ªãƒ–ジェクト. =head2 current_request () =head3 Returns -復帰値 + +(復帰値) + +=begin original The L<HTTP::WebTest::Request|HTTP::WebTest::Request> object used in current test. +=end original + ç¾åœ¨ã®ãƒ†ã‚¹ãƒˆã§ä½¿ã‚ã‚Œã¦ã„ã‚‹ L<HTTP::WebTest::Request|HTTP::WebTest::Request> オブジェクト. =head2 current_response () =head3 Returns -復帰値 + +(復帰値) + +=begin original The L<HTTP::Response|HTTP::Response> object used in current test. +=end original + ç¾åœ¨ã®ãƒ†ã‚¹ãƒˆã§ä½¿ã‚ã‚Œã¦ã„ã‚‹ L<HTTP::Response|HTTP::Response> オブジェクト. =head2 current_response_time () =head3 Returns -復帰値 + +(復帰値) + +=begin original The response time for the HTTP request used in current test. +=end original + ç¾åœ¨ã®ãƒ†ã‚¹ãƒˆã§ã® HTTP リクエストã«å¯¾ã™ã‚‹ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚¿ã‚¤ãƒ . =head2 current_results () =head3 Returns -復帰値 + +(復帰値) + +=begin original A reference to an array that contains the results of checks made by plugins for the current test. +=end original + ç¾åœ¨ã®ãƒ†ã‚¹ãƒˆã«å¯¾ã™ã‚‹ãƒ—ラグインã‹ã‚‰ã®ãƒ†ã‚¹ãƒˆçµæžœã‚’æ ¼ç´ã—ã¦ã„ã‚‹é…列ã¸ã® リファレンス. =head2 run_test ($test, $optional_params) +=begin original + Runs a single test. +=end original + 1ã¤ã®ãƒ†ã‚¹ãƒˆã‚’実行. =head3 Parameters -パラメータ + +(パラメータ) =over 4 =item * $test +=begin original + A test object. +=end original + テストオブジェクト. =item * $optional_params +=begin original + A reference to a hash that contains optional global test parameters. +=end original + ä»»æ„ã®ã‚°ãƒãƒ¼ãƒãƒ«ãƒ†ã‚¹ãƒˆãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ã‚’æ ¼ç´ã—ã¦ã„ã‚‹ãƒãƒƒã‚·ãƒ¥ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. =back =head2 convert_tests (@tests) +=begin original + Converts test objects C<@tests> of any supported type to internal canonical representation (i.e. to L<HTTP::WebTest::Test|HTTP::WebTest::Test> objects). +=end original + 多ãƒãƒ¼ãƒˆã•ã‚Œã¦ã„るタイプã®ãƒ†ã‚¹ãƒˆã‚ªãƒ–ジェクト C<@tests> を内部ã®æ¨™æº–表ç¾(ã¤ã¾ã‚Š L<HTTP::WebTest::Test|HTTP::WebTest::Test> オブジェクト)ã«å¤‰æ›ã™ã‚‹. =head3 Returns -復帰値 + +(復帰値) + +=begin original A list of L<HTTP::WebTest::Test|HTTP::WebTest::Test> objects (list context) or the first value from a list of L<HTTP::WebTest::Test|HTTP::WebTest::Test> objects (scalar context). +=end original + リストコンテã‚ストã§ã¯ L<HTTP::WebTest::Test|HTTP::WebTest::Test> オブジェクトã®ãƒªã‚¹ãƒˆ, スカラーコンテã‚ストã§ã¯ L<HTTP::WebTest::Test|HTTP::WebTest::Test> オブジェクトã®ãƒªã‚¹ãƒˆã® å…ˆé ã®å€¤. =head1 BACKWARD COMPATIBILITY -下ä½äº’æ›æ€§ + +(下ä½äº’æ›æ€§) + +=begin original C<HTTP::WebTest 2.xx> offers a richer API than its predecessor C<HTTP::WebTest 1.xx>. The old API is still supported, but may be deprecated in the future and is not recommended. +=end original + C<HTTP::WebTest 2.xx> ã¯å‰ä»»ã® C<HTTP::WebTest 1.xx> よりも リッãƒãª API ã‚’æä¾›ã—ã¦ã„ã¾ã™. å¤ã„ API も今ã®ã¨ã“ã‚サãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™ãŒ 今後廃æ¢ã•ã‚Œã‚‹ã§ã—ょã†. ã¾ãŸ, ã“れらã®ä½¿ç”¨ã¯æŽ¨å¥¨ã•ã‚Œã¾ã›ã‚“. =head2 web_test ($file, $num_fail_ref, $num_succeed_ref, $optional_options) +=begin original + Reads wtscript file and runs tests it defines. +=end original + wtscript ファイルをèªã¿è¾¼ã¿ãã“ã§å®šç¾©ã•ã‚Œã¦ã„るテストを実行ã™ã‚‹. +=begin original + In C<HTTP::WebTest 2.xx> you should use method C<run_wtscript>. +=end original + C<HTTP::WebTest 2.xx> ã§ã¯ C<run_wtscript> メソッドを使ã†ã¹ãã§ã™. =head3 Parameters -パラメータ + +(パラメータ) =over 4 =item * $file +=begin original + Name of a wtscript file. +=end original + wtscript ファイルã®åå‰. =item * $num_fail_ref +=begin original + A reference on scalar where a number of failed tests will be stored or C<undef> if you don't need it. +=end original + 失敗ã—ãŸãƒ†ã‚¹ãƒˆã®æ•°ã‚’æ ¼ç´ã™ã‚‹ã‚¹ã‚«ãƒ©ãƒ¼ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. å¿…è¦ãªã‘れ㰠undef を指定ã§ãã¾ã™. =item * $num_succed_ref +=begin original + A reference on scalar where a number of passed tests will be stored or C<undef> if you don't need it. +=end original + パス(æˆåŠŸ)ã—ãŸãƒ†ã‚¹ãƒˆã®æ•°ã‚’æ ¼ç´ã™ã‚‹ã‚¹ã‚«ãƒ©ãƒ¼ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. å¿…è¦ãªã‘れ㰠undef を指定ã§ãã¾ã™. =item * $optional_params +=begin original + A reference to a hash that contains optional test parameters which can override parameters defined in wtscript. +=end original + wtscript ã§å®šç¾©ã•ã‚Œã¦ã„るパラメータを上書ãã™ã‚‹ã“ã¨ãŒã§ãã‚‹ ä»»æ„ã®ãƒ†ã‚¹ãƒˆãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ã‚’æ ¼ç´ã—ãŸãƒãƒƒã‚·ãƒ¥ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. @@ -483,63 +706,95 @@ =head2 run_web_test ($tests, $num_fail_ref, $num_succeed_ref, $optional_options) +=begin original + This is not a method. It is subroutine which creates a C<HTTP::WebTest> object and runs test sequence using it. +=end original + ã“ã‚Œã¯ãƒ¡ã‚½ãƒƒãƒ‰ã§ã¯ã‚ã‚Šã¾ã›ã‚“. C<HTTP::WebTest> オブジェクトを 生æˆã—ãれを使ã£ã¦ãƒ†ã‚¹ãƒˆã‚·ãƒ¼ã‚±ãƒ³ã‚¹ã‚’実行ã™ã‚‹ã‚µãƒ–ルーティンã§ã™. +=begin original + You need to either import C<run_web_test> into you namespace with +=end original + 以下ã®æ–‡ã§ C<run_web_test> をインãƒãƒ¼ãƒˆã™ã‚‹ã‹, use HTTP::WebTest qw(run_web_test); +=begin original + or use the full name C<HTTP::WebTest::run_web_test> +=end original + 完全ãªåå‰ C<HTTP::WebTest::run_web_test> を使ã†å¿…è¦ãŒã‚ã‚Šã¾ã™. +=begin original + In C<HTTP::WebTest 2.xx> you should use the method C<run_tests>. +=end original + C<HTTP::WebTest 2.xx> ã§ã¯C<run_tests> メソッドを使ã†ã¹ãã§ã™. =head3 Parameters -復帰値 + +(パラメータ) =over 4 =item * $tests +=begin original + A reference to an array that contains a set of test objects. +=end original + テストオブジェクトã®ã‚»ãƒƒãƒˆã‚’æ ¼ç´ã™ã‚‹é…列ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. =item * $num_fail_ref +=begin original + A reference to a scalar where the number of failed tests will be stored or C<undef> if you don't need it. +=end original + 失敗ã—ãŸãƒ†ã‚¹ãƒˆã®æ•°ã‚’æ ¼ç´ã™ã‚‹ã‚¹ã‚«ãƒ©ãƒ¼ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. å¿…è¦ãªã‘れ㰠undef を指定ã§ãã¾ã™. =item * $num_succed_ref +=begin original + A reference to a scalar where the number of passed tests will be stored or C<undef> if you don't need it. +=end original + パス(æˆåŠŸ)ã—ãŸãƒ†ã‚¹ãƒˆã®æ•°ã‚’æ ¼ç´ã™ã‚‹ã‚¹ã‚«ãƒ©ãƒ¼ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. å¿…è¦ãªã‘れ㰠undef を指定ã§ãã¾ã™. =item * $optional_params +=begin original + A reference to a hash that contains optional test parameters. +=end original + ä»»æ„ã®ãƒ†ã‚¹ãƒˆãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ã‚’æ ¼ç´ã™ã‚‹ãƒãƒƒã‚·ãƒ¥ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. =back =head1 COPYRIGHT -著作権 Copyright (c) 2000-2001 Richard Anderson. All rights reserved. @@ -547,14 +802,17 @@ 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<HTTP::WebTest|HTTP::WebTest> Index: docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Cookbook.pod diff -u docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Cookbook.pod:1.2 docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Cookbook.pod:1.3 --- docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Cookbook.pod:1.2 Thu Jan 27 22:14:56 2011 +++ docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Cookbook.pod Thu Nov 29 22:36:11 2012 @@ -2,44 +2,63 @@ =encoding utf8 =head1 NAME -åå‰ + +=begin original HTTP::WebTest::Cookbook - Recipes for typical web tests +=end original + HTTP::WebTest::Cookbook - ウェブページã®ãƒ†ã‚¹ãƒˆã®ãƒ¬ã‚·ãƒ” =head1 SYNOPSIS -æ¦‚è¦ + +=begin original Not Applicable +=end original + 応用ãªã— =head1 DESCRIPTION -説明 + +=begin original This document contains some examples of L<HTTP::WebTest|HTTP::WebTest> usage. +=end original + ã“ã®ãƒ‰ã‚ュメントã«ã¯ L<HTTP::WebTest|HTTP::WebTest> ã®ä½¿ã„方㮠ã„ãã¤ã‹ã®ä¾‹ã‚’載ã›ã¦ã‚ã‚Šã¾ã™. +=begin original + Unless otherwise is stated all examples are either runnable programs (see L<HTTP::WebTest::API|HTTP::WebTest::API>) or runnable wtscript files (see L<perldoc wt|wt>). +=end original + 特ã«è¨˜è¿°ãŒãªã„例ã¯å®Ÿè¡Œå¯èƒ½ãªãƒ—ãƒã‚°ãƒ©ãƒ ( L<HTTP::WebTest::API|HTTP::WebTest::API> å‚ç…§) ã‚‚ã—ãã¯å®Ÿè¡Œå¯èƒ½ãª wtscript ファイル(L<perldoc wt|wt>å‚ç…§)ã§ã™. =head1 BASICS -基本 + +(基本) =head2 Test Static Web Pages -é™çš„ãªã‚¦ã‚§ãƒ–ページã®ãƒ†ã‚¹ãƒˆ + +(é™çš„ãªã‚¦ã‚§ãƒ–ページã®ãƒ†ã‚¹ãƒˆ) + +=begin original This wtscript file tests static pages on the author's website: +=end original + 以下㮠wtscript ファイルã¯è‘—者(訳注:原文ã®è‘—者)ã®ã‚¦ã‚§ãƒ–サイト上㮠é™çš„ãªãƒšãƒ¼ã‚¸ã‚’テストã—ã¾ã™: @@ -55,8 +74,12 @@ regex_require = ( Mail-CheckUser-[\d\.]+\.tar\.gz ) end_test +=begin original + The same tests in the form of a Perl script: +=end original + åŒã˜ãƒ†ã‚¹ãƒˆã® Perl スクリプト版ã§ã™: use HTTP::WebTest; @@ -80,10 +103,15 @@ ]); =head2 Test a Login Form -ãƒã‚°ã‚¤ãƒ³ãƒ•ã‚©ãƒ¼ãƒ ã®ãƒ†ã‚¹ãƒˆ + +(ãƒã‚°ã‚¤ãƒ³ãƒ•ã‚©ãƒ¼ãƒ ã®ãƒ†ã‚¹ãƒˆ) + +=begin original This wtscript file tests the login form at http://fsck.com/rt2/: +=end original + 以下㮠wtscript ファイル㯠http://fsck.com/rt2/ ã®ãƒã‚°ã‚¤ãƒ³ãƒ•ã‚©ãƒ¼ãƒ ã‚’ テストã—ã¾ã™: @@ -110,18 +138,27 @@ end_test =head2 Using link and button names instead of URLs in tests -テストä¸ã« URL ã§ã¯ãªãリンクやボタンã®åå‰ã‚’使ㆠ+ +(テストä¸ã« URL ã§ã¯ãªãリンクやボタンã®åå‰ã‚’使ã†) + +=begin original This wtscript file tests static pages on the author's website. It is similar to the example in section L</Check Static Website> but it uses the test parameter C<click_link> to specify the link to be followed on the next test request instead of a hardcoded URL: +=end original + +=begin original + ã“ã® wtscript ファイルã§ã¯è‘—者ã®ã‚¦ã‚§ãƒ–サイトã®é™çš„ãªãƒšãƒ¼ã‚¸ã‚’テストã—ã¾ã™. ã“れ㯠L<< |/é™çš„ãªã‚¦ã‚§ãƒ–ページã®ãƒ†ã‚¹ãƒˆ >> 㨠似ã¦ã„ã¾ã™ãŒ, テストパラメータ C<click_link> ã«æ¬¡ã«è¦æ±‚ã•ã‚Œã‚‹ãƒ†ã‚¹ãƒˆã‚’ URL ã®ãƒãƒ¼ãƒ‰ã‚³ãƒ¼ãƒ‰ã§ã¯ãªãリンクを指定ã™ã‚‹ã“ã¨ã§è¡Œã£ã¦ã„ã¾ã™: +=end original + # load HTTP::WebTest::Plugin::Click module which provides test # parameter 'click_link' plugins = ( ::Click ) @@ -138,11 +175,15 @@ regex_require = ( Mail-CheckUser-[\d\.]+\.tar\.gz ) end_test +=begin original + This wtscript file tests the login form at http://fsck.com/rt2/. It is similar to the example in section L</Check Login Form> but avoids using a hardcoded URL for the page the form should be submitted to by using the test parameter C<click_button>: +=end original + ã“ã® wtscript ファイル㯠http://fsck.com/rt2/ ã«ã‚ã‚‹ãƒã‚°ã‚¤ãƒ³ãƒ•ã‚©ãƒ¼ãƒ ã‚’ テストã—ã¾ã™. ã“れ㯠L<< |/ãƒã‚°ã‚¤ãƒ³ãƒ•ã‚©ãƒ¼ãƒ ã®ãƒ†ã‚¹ãƒˆ >> ã¨ä¼¼ã¦ã„ã¾ã™ãŒ, URL ã®ãƒãƒ¼ãƒ‰ã‚³ãƒ¼ãƒ‰ã‚’é¿ã‘ã¦ãƒ†ã‚¹ãƒˆãƒ‘ラメータ C<click_button> @@ -167,14 +208,20 @@ end_test =head1 ADVANCED -上級編 + +(上級編) =head2 Test::Harness Compatible Output -Test::Harness 互æ›ã®å‡ºåŠ› + +(Test::Harness 互æ›ã®å‡ºåŠ›) + +=begin original This Perl script reads a test specification from file C<test.wt> and generates L<Test::Harness|Test::Harness> compatible output: +=end original + 以下㮠Perl スクリプト㯠C<test.wt> ファイルã‹ã‚‰ãƒ†ã‚¹ãƒˆæ‰‹é †ã‚’èªã¿è¾¼ã¿ L<Test::Harness|Test::Harness> 互æ›ã®å‡ºåŠ›ã‚’生æˆã—ã¾ã™: @@ -188,6 +235,8 @@ plugins => [ '::HarnessReport' ] }); +=begin original + This script uses reporting plugin L<HTTP::WebTest::Plugin::HarnessReport|HTTP::WebTest::Plugin::HarnessReport> which internally uses L<Test::Builder|Test::Builder> module to @@ -197,6 +246,8 @@ L<Test::Differences|Test::Differences>) so you can freely intermix them in one test script. +=end original + ã“ã®ã‚¹ã‚¯ãƒªãƒ—トã§ã¯ãƒ¬ãƒãƒ¼ãƒˆãƒ—ラグイン L<HTTP::WebTest::Plugin::HarnessReport|HTTP::WebTest::Plugin::HarnessReport> を使ã£ã¦ã„ã¾ã™. ã“れ㯠L<Test::Harness|Test::Harness> 互æ›ã®å‡ºåŠ›ã‚’ @@ -207,12 +258,17 @@ 1ã¤ã®ãƒ†ã‚¹ãƒˆã‚¹ã‚¯ãƒªãƒ—トã®ä¸ã«ã“れらを自由ã«å–ã‚Šæ··ãœã‚‹ã“ã¨ãŒã§ãã¾ã™. =head2 User-Defined Tests -ユーザ定義ã®ãƒ†ã‚¹ãƒˆ + +(ユーザ定義ã®ãƒ†ã‚¹ãƒˆ) + +=begin original It is possible to define new tests without writing new plugin module. This is a fragment of a wtscript file that checks if a new record has been inserted into a database as a result of the Add Record test. +=end original + æ–°ã—ã„プラグインモジュールを書ã‹ãªãã¨ã‚‚æ–°ã—ã„テストを定義ã™ã‚‹ ã“ã¨ãŒã§ãã¾ã™. 以下㮠wtscript ファイル㯠Add Record テストã®çµæžœ æ–°ã—ã„レコードãŒãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«è¿½åŠ ã•ã‚ŒãŸã“ã¨ã‚’調ã¹ã‚‹æŠœç²‹ã§ã™. @@ -253,13 +309,18 @@ end_test =head2 Dynamic Tests -å‹•çš„ãªãƒ†ã‚¹ãƒˆ + +(å‹•çš„ãªãƒ†ã‚¹ãƒˆ) + +=begin original Sometimes you want to feed the results of a previous test into the next test. In this example, C<Add Record> creates a database record, emits HTML containing the new record ID, and C<Delete Record> deletes the database record using the record ID from C<Add Record>. +=end original + ã‚るテストã®çµæžœã‚’次ã®ãƒ†ã‚¹ãƒˆã«åæ˜ ã—ãŸã„ã“ã¨ã‚‚ã‚ã‚‹ã§ã—ょã†. 次ã®ä¾‹ã§ã¯ C<Add Record> ãŒãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’生æˆã¦ ãã®æ–°ã—ã„レコードã®IDã‚’å«ã‚“ã HTML を発行ã—, @@ -300,19 +361,21 @@ end_test =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<HTTP::WebTest|HTTP::WebTest> Index: docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Cookies.pod diff -u docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Cookies.pod:1.2 docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Cookies.pod:1.3 --- docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Cookies.pod:1.2 Thu Jan 27 22:14:56 2011 +++ docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Cookies.pod Thu Nov 29 22:36:11 2012 @@ -2,14 +2,16 @@ =encoding utf8 =head1 NAME -åå‰ + +=begin original HTTP::WebTest::Cookies - Cookie storage and management +=end original + HTTP::WebTest::Cookies - Cookie ã®æ ¼ç´åŠã³ç®¡ç† =head1 SYNOPSIS -æ¦‚è¦ use HTTP::WebTest::Cookies; @@ -22,71 +24,100 @@ $cookie_jar->extract_cookies($response); =head1 DESCRIPTION -説明 + +=begin original Subclass of L<HTTP::Cookies|HTTP::Cookies> which enables optional transmission and receipt of cookies. +=end original + クッã‚ーã®è»¢é€ã‚„å—ä¿¡ã‚’è¿½åŠ å¯èƒ½ã«ã—㟠L<HTTP::Cookies|HTTP::Cookies> 㮠サブクラス. =head1 METHODS -メソッド + +(メソッド) =head2 accept_cookies($optional_accept_cookies) +=begin original + Returns the current setting of accept_cookies. If optional boolean parameter C<$optional_accept_cookies> is passed, enables or disables receipt of cookies. +=end original + ç¾åœ¨ã® accept_cookies ã®è¨å®šã‚’è¿”ã—ã¾ã™. ä»»æ„ã®çœŸå½å€¤ãƒ‘ラメータ C<$optional_accept_cookies> ãŒæ¸¡ã•ã‚Œã‚‹ã¨ クッã‚ーã®å—信を許å¯ã‚‚ã—ãã¯ä¸è¨±å¯ã«ã—ã¾ã™. =head3 Returns -復帰値 + +(復帰値) + +=begin original True if receipt of cookies is enabled; false otherwise. +=end original + クッã‚ーã®å—ä¿¡ãŒè¨±å¯ã•ã‚Œã¦ã„ã‚Œã°çœŸ, ãã†ã§ãªã‘ã‚Œã°å½. =head2 send_cookies($optional_send_cookies) +=begin original + Returns the current setting of send_cookies. If optional boolean parameter C<$optional_send_cookies> is passed, enables or disables transmission of cookies. +=end original + ç¾åœ¨ã® send_cookies ã®è¨å®šã‚’è¿”ã—ã¾ã™. ä»»æ„ã®çœŸå½å€¤ãƒ‘ラメータ C<$optional_send_cookies> ãŒæ¸¡ã•ã‚Œã‚‹ã¨ クッã‚ーã®è»¢é€ã‚’許å¯ã‚‚ã—ãã¯ä¸è¨±å¯ã«ã—ã¾ã™. =head3 Returns -復帰値 + +(復帰値) + +=begin original True if transmission of cookies is enabled; false otherwise. +=end original + クッã‚ーã®è»¢é€ãŒè¨±å¯ã•ã‚Œã¦ã„ã‚Œã°çœŸ, ãã†ã§ãªã‘ã‚Œã°å½. =head2 extract_cookies (...) +=begin original + Overloaded method. If receipt of cookies is enabled, passes all arguments to C<SUPER::extract_cookies>. Otherwise, does nothing. +=end original + オーãƒãƒ¼ãƒãƒ¼ãƒ‰ã—ã¦ã„るメソッド. クッã‚ーã®å—ä¿¡ãŒè¨±å¯ã•ã‚Œã¦ã„ã‚Œã°å¼•æ•°ã‚’ C<SUPER::extract_cookies> 㫠渡ã—ã¾ã™. ãã†ã§ãªã‘ã‚Œã°ä½•ã‚‚ã—ã¾ã›ã‚“. =head2 add_cookie_header (...) +=begin original + Overloaded method. If transmission of cookies is enabled, passes all arguments to C<SUPER::add_cookie_header>. Otherwise, does nothing. +=end original + オーãƒãƒ¼ãƒãƒ¼ãƒ‰ã—ã¦ã„るメソッド. クッã‚ーã®è»¢é€ãŒè¨±å¯ã•ã‚Œã¦ã„ã‚Œã°å¼•æ•°ã‚’ C<SUPER::add_cookie_header> 㫠渡ã—ã¾ã™. ãã†ã§ãªã‘ã‚Œã°ä½•ã‚‚ã—ã¾ã›ã‚“. =head1 COPYRIGHT -著作権 Copyright (c) 2000-2001 Richard Anderson. All rights reserved. @@ -94,14 +125,17 @@ 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<HTTP::WebTest|HTTP::WebTest> Index: docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Parser.pod diff -u docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Parser.pod:1.2 docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Parser.pod:1.3 --- docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Parser.pod:1.2 Thu Jan 27 22:14:56 2011 +++ docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Parser.pod Thu Nov 29 22:36:11 2012 @@ -2,71 +2,96 @@ =encoding utf8 =head1 NAME -åå‰ + +=begin original HTTP::WebTest::Parser - Parse wtscript files. +=end original + HTTP::WebTest::Parser - wtscript ファイルã®è§£æž =head1 SYNOPSIS -æ¦‚è¦ use HTTP::WebTest::Parser; my $tests = HTTP::WebTest::Parser->parse($data); =head1 DESCRIPTION -説明 + +=begin original Parses a wtscript file and converts it to a set of test objects. +=end original + wtscript ファイルを解æžã—ã¦ãƒ†ã‚¹ãƒˆã‚ªãƒ–ジェクトã®ã‚»ãƒƒãƒˆã«å¤‰æ›ã—ã¾ã™. =head1 CLASS METHODS =head2 parse ($data) +=begin original + Parses wtscript text data passed in a scalar variable C<$data>. +=end original + スカラー変数 C<$data> ã«æ¸¡ã•ã‚ŒãŸ wtscript テã‚ストデータを解æžã—ã¾ã™. =head3 Returns -復帰値 + +(復帰値) + +=begin original A list of two elements - a reference to an array that contains test objects and a reference to a hash that contains test parameters. +=end original + ï¼’ã¤ã®è¦ç´ ã‚’ã‚‚ã¤ãƒªã‚¹ãƒˆ - ãƒ†ã‚¹ãƒˆã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’æ ¼ç´ã—ãŸé…列ã¸ã® リファレンスã¨ãƒ†ã‚¹ãƒˆãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ã‚’æ ¼ç´ã—ãŸãƒãƒƒã‚·ãƒ¥ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. =head2 write_test ($params_aref) +=begin original + Given a set of test parameters generates text representation of the test. +=end original + 与ãˆã‚‰ã‚ŒãŸãƒ†ã‚¹ãƒˆãƒ‘ラメータã‹ã‚‰ãƒ†ã‚¹ãƒˆã®ãƒ†ã‚スト表ç¾ã‚’生æˆã—ã¾ã™. =head3 Returns -復帰値 + +(復帰値) + +=begin original The test text. +=end original + テストテã‚スト. =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<HTTP::WebTest|HTTP::WebTest> Index: docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Plugin.pod diff -u docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Plugin.pod:1.2 docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Plugin.pod:1.3 --- docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Plugin.pod:1.2 Thu Jan 27 22:14:56 2011 +++ docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Plugin.pod Thu Nov 29 22:36:11 2012 @@ -2,177 +2,272 @@ =encoding utf8 =head1 NAME -åå‰ + +=begin original HTTP::WebTest::Plugin - Base class for HTTP::WebTest plugins. +=end original + HTTP::WebTest::Plugin - HTTP::WebTest プラグインã®åŸºåº•ã‚¯ãƒ©ã‚¹ =head1 SYNOPSIS -æ¦‚è¦ + +=begin original Not applicable. +=end original + ãªã—. =head1 DESCRIPTION -説明 + +=begin original L<HTTP::WebTest|HTTP::WebTest> plugin classes can inherit from this class. It provides some useful helper methods. +=end original + L<HTTP::WebTest|HTTP::WebTest> プラグインクラスã¯ã“ã®ã‚¯ãƒ©ã‚¹ã‹ã‚‰æ´¾ç”Ÿã•ã›ã¾ã™. ã“ã“ã§ã¯ä¾¿åˆ©ãªãƒ˜ãƒ«ãƒ‘ーメソッドãŒæä¾›ã•ã‚Œã¦ã„ã¾ã™. =head1 METHODS -メソッド + +(メソッド) =head2 new ($webtest) +=begin original + Constructor. +=end original + コンストラクタ. =head3 Returns -復帰値 + +(復帰値) + +=begin original A new plugin object that will be used by L<HTTP::WebTest|HTTP::WebTest> object C<$webtest>. +=end original + L<HTTP::WebTest|HTTP::WebTest> オブジェクト C<$webtest> ã«ã‚ˆã£ã¦ä½¿ç”¨ã•ã‚Œã‚‹ æ–°ã—ã„プラグインオブジェクト. =head2 webtest () =head3 Returns -復帰値 + +(復帰値) + +=begin original An L<HTTP::WebTest|HTTP::WebTest> object that uses this plugin. +=end original + ã“ã®ãƒ—ラグインを使ã£ã¦ã„ã‚‹ L<HTTP::WebTest|HTTP::WebTest> オブジェクト. =head2 global_test_param ($param, $optional_default) =head3 Returns -復帰値 + +(復帰値) + +=begin original If global test parameter C<$param> is not defined, returns C<$optional_default> or C<undef> if there is no default. +=end original + ã‚°ãƒãƒ¼ãƒãƒ«ãƒ†ã‚¹ãƒˆãƒ‘ラメータ C<$param> ãŒå®šç¾©ã•ã‚Œã¦ã„ãªã‘れ㰠C<$optional_default>. デフォルト値も渡ã•ã‚Œã¦ã„ãªã‘れ㰠C<undef>. +=begin original + If the global test parameter C<$param> is defined, returns it's value. +=end original + ã‚°ãƒãƒ¼ãƒãƒ«ãƒ†ã‚¹ãƒˆãƒ‘ラメータ C<$param> ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚Œã°ãã®å€¤. =head2 test_param ($param, $optional_default) =head3 Returns -復帰値 + +(復帰値) + +=begin original If latest test parameter C<$param> is not defined, returns C<$optional_default> or C<undef> if there is no default. +=end original + 最新ã®ãƒ†ã‚¹ãƒˆãƒ‘ラメータ C<$param> ãŒå®šç¾©ã•ã‚Œã¦ã„ãªã‘れ㰠C<$optional_default>. デフォルト値も渡ã•ã‚Œã¦ã„ãªã‘れ㰠C<undef>. +=begin original + If latest test parameter C<$param> is defined returns it's value. +=end original + 最新ã®ã®ãƒ†ã‚¹ãƒˆãƒ‘ラメータ C<$param> ãŒå®šç¾©ã•ã‚Œã¦ã„ã‚Œã°ãã®å€¤. =head2 global_yesno_test_param ($param, $optional_default) =head3 Returns -復帰値 + +(復帰値) + +=begin original If the global test parameter C<$param> is not defined, returns C<$optional_default> or false if no default exists. +=end original + ã‚°ãƒãƒ¼ãƒãƒ«ãƒ†ã‚¹ãƒˆãƒ‘ラメータ C<$param> ãŒå®šç¾©ã•ã‚Œã¦ã„ãªã‘れ㰠C<$optional_default>. デフォルト値も渡ã•ã‚Œã¦ã„ãªã‘ã‚Œã°å½. +=begin original + If the global test parameter C<$param> is defined, returns true if latest test parameter C<$param> is C<yes>, false otherwise. +=end original + ã‚°ãƒãƒ¼ãƒãƒ«ãƒ†ã‚¹ãƒˆãƒ‘ラメータ C<$param> ãŒå®šç¾©ã•ã‚Œã¦ã‚‹ã®ãªã‚‰, 最新ã®ãƒ†ã‚¹ãƒˆãƒ‘ラメータ C<$param> ㌠C<yes> ã§ã‚ã‚Œã°çœŸ, ãã†ã§ãªã‘ã‚Œã°å½. =head2 yesno_test_param ($param, $optional_default) =head3 Returns -復帰値 + +(復帰値) + +=begin original If latest test parameter C<$param> is not defined returns C<$optional_default> or false if it is not defined also. +=end original + 最新ã®ãƒ†ã‚¹ãƒˆãƒ‘ラメータ C<$param> ãŒå®šç¾©ã•ã‚Œã¦ã„ãªã‘れ㰠C<$optional_default>. デフォルト値も渡ã•ã‚Œã¦ã„ãªã‘ã‚Œã°å½. +=begin original + If latest test parameter C<$param> is defined returns true if latest test parameter C<$param> is C<yes>. False otherwise. +=end original + 最新ã®ãƒ†ã‚¹ãƒˆãƒ‘ラメータ C<$param> ãŒå®šç¾©ã•ã‚Œã¦ã‚‹ã®ãªã‚‰, 最新ã®ãƒ†ã‚¹ãƒˆãƒ‘ラメータ C<$param> ㌠C<yes> ã§ã‚ã‚Œã°çœŸ, ãã†ã§ãªã‘ã‚Œã°å½. =head2 test_result ($ok, $comment) +=begin original + Factory method that creates test result object. +=end original + テストçµæžœã‚ªãƒ–ジェクトを作るファクトリメソッド. =head3 Returns -復帰値 + +(復帰値) + +=begin original A L<HTTP::WebTest::TestResult|HTTP::WebTest::TestResult> object. +=end original + L<HTTP::WebTest::TestResult|HTTP::WebTest::TestResult> オブジェクト. =head2 validate_params (@params) +=begin original + Checks test parameters in C<@params>. Throws exception if any of them are invalid. +=end original + C<@params> ã®ä¸ã®ãƒ†ã‚¹ãƒˆãƒ‘ラメータを調ã¹ã¾ã™. ã‚‚ã—ä¸æ£ãªã‚‚ã®ãŒã‚れ㰠例外をãªã’ã¾ã™. =head2 global_validate_params (@params) +=begin original + Checks global test parameters in C<@params>. Throws exception if any of them are invalid. +=end original + C<@params> ã®ä¸ã®ã‚°ãƒãƒ¼ãƒãƒ«ãƒ†ã‚¹ãƒˆãƒ‘ラメータを調ã¹ã¾ã™. ã‚‚ã—ä¸æ£ãªã‚‚ã®ãŒã‚れ㰠例外をãªã’ã¾ã™. =head2 validate_value($param, $value, $type) +=begin original + Checks if C<$value> of test parameter C<$param> has type <$type>. +=end original + テストパラメータ C<$param> ã® C<$value> ãŒã‚¿ã‚¤ãƒ— <$type> ã‚’æŒã£ã¦ã„る㋠を調ã¹ã¾ã™. =head3 Exceptions -例外 + +(例外) + +=begin original Dies if check is not successful. +=end original + ãƒã‚§ãƒƒã‚¯ãŒæˆåŠŸã—ãªã‘れ㰠die ã—ã¾ã™. =head2 param_types () +=begin original + This method should be redefined in the subclasses. Returns information about test parameters that are supported by plugin. Used to validate tests. +=end original + ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã‚µãƒ–クラスã§å†å®šç¾©ã•ã‚Œã‚‹ã¹ãã§ã™. プラグインãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹ãƒ†ã‚¹ãƒˆãƒ‘ラメータã«é–¢ã™ã‚‹æƒ…å ±ã‚’è¿”ã—ã¾ã™. テストã®æ¤œè¨¼ã«ä½¿ã‚ã‚Œã¾ã™. =head3 Returns -復帰値 + +(復帰値) + +=begin original A string that looks like: +=end original + 次ã®ã‚ˆã†ãªæ–‡å—列ã§ã™: 'param1 type1 @@ -182,54 +277,82 @@ =head2 check_anything ($value) +=begin original + Method that checks whether test parameter value is of C<anything> type. +=end original + テストパラメータã®å€¤ãŒ C<anything> タイプã§ã‚ã‚‹ã“ã¨ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹ メソッドã§ã™. +=begin original + This is NOOP operation. It always succeed. +=end original + ã“ã‚Œã¯ä½•ã‚‚ã—ã¾ã›ã‚“. 常ã«æˆåŠŸã—ã¾ã™. =head2 check_list ($param, $value, @optional_spec) +=begin original + Method that checks whether test parameter value is of C<list> type. That is it is a reference on an array. +=end original + テストパラメータã®å€¤ãŒ C<list> タイプ ã‹ã‚‰æˆã‚‹ã“ã¨ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™. ã¤ã¾ã‚Šé…列ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹ã§ã‚ã‚‹ã“ã¨ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™. +=begin original + Optional list C<@optional_spec> can define specification on allowed elements of list. It can be either +=end original + ä»»æ„ã®ãƒªã‚¹ãƒˆ C<@optional_spec> ã¯ãƒªã‚¹ãƒˆã«è¨±å¯ã•ã‚Œã‚‹è¦ç´ を定義ã—ã¾ã™. 次ã®ã„ãšã‚Œã‹ã®å½¢å¼ã§æŒ‡å®šã—ã¾ã™: ('TYPE_1', 'TYPE_2', ..., 'TYPE_N') +=begin original + or +=end original + ã‚‚ã—ã㯠('TYPE_1', 'TYPE_2', ..., 'TYPE_M', '...') +=begin original + First specification requires list value of test parameter to contain C<N> elements. First element of list should be of should C<TYPE_1> type, second element of list should of C<TYPE_2> type, ..., N-th element of list should be of C<TYPE_N> type. +=end original + 1ã¤ã‚ã®æŒ‡å®šã§ã¯ãƒ†ã‚¹ãƒˆãƒ‘ラメータ㌠C<N> 個ã®è¦ç´ ã‚’æŒã£ã¦ã„るリスト㧠ã‚ã‚‹ã“ã¨ã‚’è¦æ±‚ã—ã¾ã™. リストã®æœ€åˆã®è¦ç´ 㯠C<TYPE_1> タイプã§ã‚ã‚Š, リストã®ï¼’ã¤ç›®ã®è¦ç´ 㯠C<TYPE_2> ã§ã‚ã‚Š, ..., リスト㮠N 番目ã®è¦ç´ 㯠C<TYPE_N> タイプã§ã‚ã‚‹ã¹ãã§ã™. +=begin original + Second specification requires list value of test parameter to contain at least C<N> elements. First element of list should be of should C<TYPE_1> type, second element of list should of C<TYPE_2> type, ..., M-th element of list should be of C<TYPE_M> type, all following elements should be of C<TYPE_M> type. +=end original + ï¼’ã¤ã‚ã®æŒ‡å®šã§ã¯ãƒ†ã‚¹ãƒˆãƒ‘ラメータãŒå°‘ãªãã¨ã‚‚ C<M> 個ã®è¦ç´ ã‚’æŒã£ã¦ã„ã‚‹ リストã§ã‚ã‚‹ã“ã¨ã‚’è¦æ±‚ã—ã¾ã™. リストã®æœ€åˆã®è¦ç´ 㯠C<TYPE_1> タイプã§ã‚ã‚Š, リストã®ï¼’ã¤ç›®ã®è¦ç´ 㯠C<TYPE_2> ã§ã‚ã‚Š, ..., リスト㮠M 番目ã®è¦ç´ 㯠@@ -237,101 +360,152 @@ ã‚ã‚‹ã¹ãã§ã™. =head3 Exceptions -例外 + +(例外) + +=begin original Dies if checks is not successful. +=end original + ãƒã‚§ãƒƒã‚¯ãŒæˆåŠŸã—ãªã‘れ㰠die ã—ã¾ã™. =head2 check_scalar ($param, $value, $optional_regexp) +=begin original + Method that checks whether test parameter value is of C<scalar> type (that is it is usual Perl scalar and is not a reference). +=end original + テストパラメータ㌠C<scalar> タイプ(通常㮠Perl ã®ã‚¹ã‚«ãƒ©ãƒ¼ã§ã‚ã‚Š, リファレンスã¯å«ã¿ã¾ã›ã‚“)ã§ã‚ã‚‹ã“ã¨ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™. +=begin original + If C<$optional_regexp> is specified also checks value of parameter using this regual expression. +=end original + C<$optional_regexp> ãŒæŒ‡å®šã•ã‚ŒãŸã®ãªã‚‰ãƒ‘ラメータã®å€¤ã‚’ã“ã®æ£è¦è¡¨ç¾ã§ã‚‚ ãƒã‚§ãƒƒã‚¯ã—ã¾ã™. =head3 Exceptions -例外 + +(例外) + +=begin original Dies if check is not successful. +=end original + ãƒã‚§ãƒƒã‚¯ãŒæˆåŠŸã—ãªã‘れ㰠die ã—ã¾ã™. =head2 check_stringref ($param, $value) +=begin original + Method that checks whether test parameter value is of C<stringref> type (that is it is a reference on scalar). +=end original + テストパラメータã®å€¤ãŒ C<stringref> タイプ(スカラーã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹) ã§ã‚ã‚‹ã“ã¨ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™. =head3 Exceptions -例外 + +(例外) + +=begin original Dies if check is not successful. +=end original + ãƒã‚§ãƒƒã‚¯ãŒæˆåŠŸã—ãªã‘れ㰠die ã—ã¾ã™. =head2 check_uri ($param, $value) +=begin original + Method that checks whether test parameter value is of C<uri> type (that is it either scalar or L<URI|URI> object). +=end original + テストパラメータã®å€¤ãŒ C<uri> タイプ (スカラーもã—ã㯠L<URI|URI> オブジェクト)ã§ã‚ã‚‹ã“ã¨ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™. =head3 Exceptions -例外 + +(例外) + +=begin original Dies if check is not successful. +=end original + ãƒã‚§ãƒƒã‚¯ãŒæˆåŠŸã—ãªã‘れ㰠die ã—ã¾ã™. =head2 check_hashlist ($param, $value) +=begin original + Method that checks whether test parameter value is of C<hashlist> type (that is it is either a hash reference or an array reference that points to array containing even number of elements). +=end original + テストパラメータã®å€¤ãŒ C<hashlist> タイプ(ãƒãƒƒã‚·ãƒ¥ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹ ã‚‚ã—ãã¯å¶æ•°å€‹ã®è¦ç´ ã‚’ã‚‚ã¤é…列ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹)ã§ã‚ã‚‹ã“ã¨ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™. =head3 Exceptions -例外 + +(例外) + +=begin original Dies if check is not successful. +=end original + ãƒã‚§ãƒƒã‚¯ãŒæˆåŠŸã—ãªã‘れ㰠die ã—ã¾ã™. =head2 check_yesno ($param, $value) +=begin original + Same as +=end original + 以下ã®åˆ†ã¨ç‰å€¤ã§ã™: check_scalar($param, $value, '^(?:yes|no)$'); =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<HTTP::WebTest|HTTP::WebTest> Index: docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Plugins.pod diff -u docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Plugins.pod:1.2 docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Plugins.pod:1.3 --- docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Plugins.pod:1.2 Thu Jan 27 22:14:56 2011 +++ docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Plugins.pod Thu Nov 29 22:36:11 2012 @@ -2,41 +2,56 @@ =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<HTTP::WebTest|HTTP::WebTest> functionality with external plugins. +=end original + ã“ã®ãƒ‰ã‚ュメント㯠L<HTTP::WebTest|HTTP::WebTest> を外部プラグインを ã¤ã‹ã£ã¦æ‹¡å¼µã—よã†ã¨ã™ã‚‹é–‹ç™ºè€…ã®ã‚¹ã‚¿ãƒ¼ãƒˆåœ°ç‚¹ã§ã™. =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<HTTP::WebTest|HTTP::WebTest> at various stages of test. +=end original + プラグインã¯æ–°ã—ã„テストタイプやレãƒãƒ¼ãƒˆã‚¿ã‚¤ãƒ—ã‚’è¿½åŠ ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™. プラグインã¯ãƒ†ã‚¹ãƒˆã®æ§˜ã€…ãªå±€é¢ã§ L<HTTP::WebTest|HTTP::WebTest> ã‹ã‚‰ 呼ã³å‡ºã•ã‚Œã‚‹ã„ãã¤ã‹ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’クラスã¨ã—ã¦å®šç¾©ã—ã¦ã„ã‚‹ Perl パッケージ ã«ã™ãŽã¾ã›ã‚“. +=begin original + Each plugin package should subclass L<HTTP::WebTest::Plugin|HTTP::WebTest::Plugin>. Report plugins can subclass L<HTTP::WebTest::ReportPlugin|HTTP::WebTest::ReportPlugin> @@ -45,6 +60,8 @@ some helper methods useful in report plugins and handles some test parameters common for report plugins. +=end original + å„プラグインパッケージ㯠L<HTTP::WebTest::Plugin|HTTP::WebTest::Plugin> ã®ã‚µãƒ–クラスã§ã‚ã‚‹ã¹ãã§ã™. レãƒãƒ¼ãƒˆãƒ—ラグイン㯠L<HTTP::WebTest::Plugin|HTTP::WebTest::Plugin> ã®ã‚µãƒ–クラスã§ã‚ã‚‹ @@ -54,40 +71,62 @@ レãƒãƒ¼ãƒˆãƒ—ラグインãŒå…±é€šã—ã¦è¡Œã†ãƒ†ã‚¹ãƒˆãƒ‘ラメータã®æ“作を定義ã—ã¦ã„ã¾ã™. =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<HTTP::WebTest::Plugin|HTTP::WebTest::Plugin>. Type C<foobar> is defined as method C<check_foobar> in this package. See its documentation for list of all C<check_****> methods - these methods define all known test types. +=end original + å„テストパラメータタイプ㯠L<HTTP::WebTest::Plugin|HTTP::WebTest::Plugin> ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¨ã—ã¦å®šç¾©ã•ã‚Œã¦ã„ã¾ã™. タイプ C<foobar> 㯠メソッド C<check_foobar> ã¨ã—ã¦å®šç¾©ã•ã‚Œã¦ã„ã¾ã™. å…¨ã¦ã® C<check_****> メソッド㮠@@ -96,7 +135,6 @@ ã“ã®åå‰ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã™ã¹ã¦æ—¢çŸ¥ã®ãƒ†ã‚¹ãƒˆã‚¿ã‚¤ãƒ—ã¨ã—ã¦å®šç¾©ã•ã‚Œã¦ã„ã¾ã™. =head3 Example -例 sub param_types { return q(ignore_case yesno @@ -106,12 +144,16 @@ regex_require list); } +=begin original + This is from L<HTTP::WebTest::Plugin::TextMatchTest|HTTP::WebTest::Plugin::TextMatchTest>. It defines the test parameters C<ignore_case>, C<text_forbid>, C<text_require>, C<regex_forbid> and C<regex_require>. C<yesno> and C<list> are test parameter types. +=end original + ã“れ㯠L<HTTP::WebTest::Plugin::TextMatchTest|HTTP::WebTest::Plugin::TextMatchTest>. ã«ã‚ã‚‹ã‚‚ã®ã§ã™. ã“ã“ã§ã¯ãƒ†ã‚¹ãƒˆãƒ‘ラメータ C<ignore_case>, C<text_forbid>, @@ -119,63 +161,93 @@ C<yesno> åŠã³ C<list> ã¯ãƒ†ã‚¹ãƒˆãƒ‘ラメータタイプã§ã™. =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<HTTP::WebTest|HTTP::WebTest> submits the HTTP request. Various properties of request can be set here. +=end original + L<HTTP::WebTest|HTTP::WebTest> ㌠HTTP リクエストをé€ä¿¡ã™ã‚‹ç›´å‰ã« 呼ã³å‡ºã•ã‚Œã¾ã™. リクエストã«å¯¾ã™ã‚‹æ§˜ã€…ãªå±žæ€§ã‚’ã“ã“ã§è¨å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™. =head2 check_response () +=begin original + Called after L<HTTP::WebTest|HTTP::WebTest> gets the HTTP response. Web page tests should be placed here. +=end original + L<HTTP::WebTest|HTTP::WebTest> ㌠HTTP レスãƒãƒ³ã‚¹ã‚’å—ã‘å–ã£ãŸå¾Œã« 呼ã³å‡ºã•ã‚Œã¾ã™. ウェブページをã“ã“ã§ãƒ†ã‚¹ãƒˆã—ã¾ã™. =head2 report_test () +=begin original + Called after all L<HTTP::WebTest|HTTP::WebTest> <check_response> hooks are called. Normally used by report plugins to generate report about test just done. +=end original + å…¨ã¦ã® L<HTTP::WebTest|HTTP::WebTest> <check_response> フックを呼ã³çµ‚ãˆãŸ 後ã«å‘¼ã³å‡ºã•ã‚Œã¾ã™. 通常レãƒãƒ¼ãƒˆãƒ—ラグインãŒä»Šçµ‚ã‚ã£ãŸãƒ†ã‚¹ãƒˆã«é–¢ã™ã‚‹ãƒ¬ãƒãƒ¼ãƒˆã‚’ 生æˆã™ã‚‹ãŸã‚ã«ä½¿ã„ã¾ã™. =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, ... ], @@ -183,63 +255,88 @@ ... ]; +=begin original + C<TEST_GROUP_NAME> 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<TEST_GROUP_NAME> ã¯ã‚¦ã‚§ãƒ–テストåŠã³ãã®çµæžœã®ã‚°ãƒ«ãƒ¼ãƒ—ã«ã¤ã„㦠説明ã™ã‚‹æ–‡å—列ã§ã™. テストレãƒãƒ¼ãƒˆã®ç”Ÿæˆã«ä½¿ã‚ã‚Œã¾ã™. +=begin original + C<TEST_RESULT> is an L<HTTP::WebTest::TestResult|HTTP::WebTest::TestResult> object. +=end original + C<TEST_RESULT> 㯠L<HTTP::WebTest::TestResult|HTTP::WebTest::TestResult> オブジェクトã§ã™. =head1 EXAMPLES -例 + +=begin original Some examples of plugins are: +=end original + プラグインã®ä¾‹ã‚’挙ã’ã¦ã¿ã¾ã™: =over 4 =item L<HTTP::WebTest::Plugin::Cookies|HTTP::WebTest::Plugin::Cookies> +=begin original + Plugin that uses both C<prepare_request> and C<check_response> hooks. +=end original + C<prepare_request> åŠã³ C<check_response> ã®ï¼’ã¤ã®ãƒ•ãƒƒã‚¯ã‚’使ã£ã¦ã„ã¾ã™. =item L<HTTP::WebTest::Plugin::StatusTest|HTTP::WebTest::Plugin::StatusTest> +=begin original + Simple plugin that defines only the C<check_response> hook. +=end original + C<check_response> フックã®ã¿ã‚’定義ã—ã¦ã„ã‚‹ç°¡å˜ãªãƒ—ラグイン. =item L<HTTP::WebTest::Plugin::DefaultReport|HTTP::WebTest::Plugin::DefaultReport> +=begin original + Example of a report plugin. Uses C<start_tests>, C<report_test> and C<end_tests> hooks. +=end original + レãƒãƒ¼ãƒˆãƒ—ラグインã§ã™. C<start_tests>, C<report_test>, ãã—㦠C<end_tests> フックを使ã£ã¦ã„ã¾ã™. =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<HTTP::WebTest|HTTP::WebTest> Index: docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/ReportPlugin.pod diff -u docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/ReportPlugin.pod:1.3 docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/ReportPlugin.pod:1.4 --- docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/ReportPlugin.pod:1.3 Mon Feb 7 02:53:00 2011 +++ docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/ReportPlugin.pod Thu Nov 29 22:36:11 2012 @@ -2,51 +2,69 @@ =encoding utf8 =head1 NAME -åå‰ + +=begin original HTTP::WebTest::ReportPlugin - Subclass for HTTP::WebTest report plugins. +=end original + HTTP::WebTest::ReportPlugin - HTTP::WebTest レãƒãƒ¼ãƒˆç”¨ã®ãƒ—ラグインã®ã‚µãƒ–クラス =head1 SYNOPSIS -æ¦‚è¦ + +=begin original Not applicable. +=end original + ãªã—. =head1 DESCRIPTION -説明 + +=begin original This is a subclass of L<HTTP::WebTest|HTTP::WebTest::Plugin>. L<HTTP::WebTest|HTTP::WebTest> report plugin classes can inherit from this class. It handles some test parameters common to report plugins by providing implementation of the method C<print>. +=end original + ã“ã®ã‚¯ãƒ©ã‚¹ã¯ L<HTTP::WebTest|HTTP::WebTest::Plugin> ã®ã‚µãƒ–クラスã§ã™. L<HTTP::WebTest|HTTP::WebTest> ã®ãƒ¬ãƒãƒ¼ãƒˆãƒ—ラグインã¯ã“ã®ã‚¯ãƒ©ã‚¹ã‚’ 継承ã•ã›ã¾ã™. ã“ã“ã§ã¯ãƒ¡ã‚½ãƒƒãƒ‰ C<print> ã®å®Ÿè£…ã‚’æä¾›ã™ã‚‹ã“ã¨ã§ レãƒãƒ¼ãƒˆãƒ—ラグインã«å…±é€šã™ã‚‹ã„ãã¤ã‹ã®ãƒ†ã‚¹ãƒˆãƒ‘ラメータを処ç†ã—ã¦ã„ã¾ã™. =head1 TEST PARAMETERS -テストパラメータ + +(テストパラメータ) =head2 output_ref I<GLOBAL PARAMETER> +=begin original + A reference to a scalar that accumulates text of test report. If this test parameter is specified then value of test parameter C<fh_out> is ignore. +=end original + テストレãƒãƒ¼ãƒˆã®ãƒ†ã‚ストを蓄ç©ã•ã›ã‚‹ãŸã‚ã®ã‚¹ã‚«ãƒ©ãƒ¼ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹ã‚’ 指定ã—ã¾ã™. ã“ã®ãƒ‘ラメータãŒæŒ‡å®šã•ã‚Œã¦å¤šæ™‚㯠C<fh_out> テスト パラメータã®å€¤ã¯ç„¡è¦–ã•ã‚Œã¾ã™. +=begin original + This parameter can be used only when passing the test parameters as arguments from a calling Perl script. +=end original + ã“ã®ãƒ‘ラメータ㯠Perl スクリプトã®ãƒ†ã‚¹ãƒˆãƒ‘ラメータ引数ã¨ã—㦠渡ã•ã‚ŒãŸã¨ãã®ã¿ä½¿ã‚ã‚Œã¾ã™. @@ -55,17 +73,25 @@ I<GLOBAL PARAMETER> +=begin original + A filehandle (or anything else that supports C<print>) to use for test report output. This parameter is ignored if test parameter C<output_ref> is specified also. +=end original + テストレãƒãƒ¼ãƒˆã‚’出力ã™ã‚‹ãŸã‚ã«ä½¿ã†ãƒ•ã‚¡ã‚¤ãƒ«ãƒãƒ³ãƒ‰ãƒ«(ã‚‚ã—ã㯠C<print> をサãƒãƒ¼ãƒˆã™ã‚‹ä½•ã‹). ã“ã®ãƒ‘ラメータ㯠テストパラメータ C<output_ref> ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹ã¨ãã«ã¯ç„¡è¦–ã•ã‚Œã¾ã™. +=begin original + This parameter can be used only when passing the test parameters as arguments from a calling Perl script. +=end original + ã“ã®ãƒ‘ラメータ㯠Perl スクリプトã®ãƒ†ã‚¹ãƒˆãƒ‘ラメータ引数ã¨ã—㦠渡ã•ã‚ŒãŸã¨ãã®ã¿ä½¿ã‚ã‚Œã¾ã™. @@ -74,9 +100,13 @@ I<GLOBAL PARAMETER> +=begin original + Option to e-mail output to one or more addresses specified by C<mail_addresses> test parameter. +=end original + C<mail_addresses> テストパラメータã§æŒ‡å®šã•ã‚Œã¦ã„る1ã¤ã¾ãŸã¯ãれ以上㮠アドレス㫠e-mail ã§å‡ºåŠ›ã‚’é€ã‚‹ã‹ã®è¨å®š. @@ -85,17 +115,22 @@ I<GLOBAL PARAMETER> +=begin original + Sets C<Subject> header for test report e-mails when all tests are passed successfully. In this string some character sequences have special meaning (see C<mail_failure_subject> parameter for their description). +=end original + å…¨ã¦ã®ãƒ†ã‚¹ãƒˆãŒæˆåŠŸã—ãŸæ™‚ã®ãƒ†ã‚¹ãƒˆãƒ¬ãƒãƒ¼ãƒˆe-mailã® C<Subject> ヘッダ㮠è¨å®š. ã“ã®æ–‡å—列ã«ã¯ç‰¹åˆ¥ãªæ„味をæŒã¤æ–‡å—並ã³ãŒã‚ã‚Šã¾ã™ (C<mail_failure_subject> パラメータをå‚ç…§ã—ã¦ãã ã•ã„). =head3 Default Value -デフォルト値 + +(デフォルト値) C<Web tests succeeded> @@ -105,9 +140,13 @@ I<GLOBAL PARAMETER> +=begin original + Sets C<Subject> header for test report e-mails when some tests fail. In this string some character sequences have special meaning: +=end original + 失敗ã—ãŸãƒ†ã‚¹ãƒˆãŒã‚ã£ãŸã¨ãã« e-mail テストレãƒãƒ¼ãƒˆã® C<Subject> ヘッダをè¨å®šã—ã¾ã™. ã“ã®æ–‡å—列ã«ã¯ç‰¹åˆ¥ãªæ„味をæŒã¤æ–‡å—並ã³ãŒ ã‚ã‚Šã¾ã™. @@ -116,32 +155,49 @@ =item %f +=begin original + the number of failed tests +=end original + 失敗ã—ãŸãƒ†ã‚¹ãƒˆã®æ•° =item %s +=begin original + the number of successful tests +=end original + æˆåŠŸã—ãŸãƒ†ã‚¹ãƒˆã®æ•° =item %t +=begin original + the total number of tests +=end original + テストã®ç·æ•° =item %% +=begin original + replaced with single C<%> +=end original + 1ã¤ã® C<%> ã«ç½®æ›ã•ã‚Œã¾ã™ =back =head3 Default Value -デフォルト値 + +(デフォルト値) C<WEB TESTS FAILED! FOUND %f ERROR(S)> @@ -151,9 +207,13 @@ I<GLOBAL PARAMETER> +=begin original + A list of e-mail addresses where report will be send (if sending report is enabled with C<mail> test parameter). +=end original + レãƒãƒ¼ãƒˆã‚’é€ã‚‹ e-mail アドレスã®ãƒªã‚¹ãƒˆ(C<mail> テストパラメータ㧠レãƒãƒ¼ãƒˆã®é€ä¿¡ãŒæœ‰åŠ¹ã«ã•ã‚Œã¦ã„ã‚‹ã¨ãã ã‘é€ã‚‰ã‚Œã¾ã™). @@ -161,20 +221,32 @@ =item * all +=begin original + Send e-mail containing test results. +=end original + テストçµæžœã‚’å«ã‚“ã e-mail ã‚’é€ã‚Šã¾ã™. =item * errors +=begin original + Send e-mail only if one or more tests fails. +=end original + 1ã¤ã¾ãŸã¯ãれ以上ã®ãƒ†ã‚¹ãƒˆãŒå¤±æ•—ã—ãŸã¨ãã«ã ã‘ e-mail ã‚’é€ã‚Šã¾ã™. =item * no +=begin original + Do not send e-mail. +=end original + e-mail ã‚’é€ä¿¡ã—ã¾ã›ã‚“. =over 8 @@ -194,12 +266,17 @@ I<GLOBAL PARAMETER> +=begin original + Fully-qualified name of of the mail server (e.g., mailhost.mycompany.com). +=end original + メールサーãƒã®å®Œå…¨ä¿®é£¾ãƒ‰ãƒ¡ã‚¤ãƒ³å(例ãˆã° mailhost.mycompany.com). =head3 Default value -デフォルト値 + +(デフォルト値) C<localhost> @@ -209,59 +286,90 @@ I<GLOBAL PARAMETER> +=begin original + Sets From: header for test report e-mails. +=end original + e-mail テストレãƒãƒ¼ãƒˆã® From: ヘッダをè¨å®šã—ã¾ã™. =head3 Default Value -デフォルト値 + +(デフォルト値) + +=begin original Name of user under which test script runs. +=end original + テストスクリプトを実行ã—ãŸãƒ¦ãƒ¼ã‚¶ã®åå‰. =head1 CLASS METHODS -クラスメソッド + +(クラスメソッド) =head2 test_output () =head3 Returns -復帰値 + +(復帰値) + +=begin original Returns a reference to buffer that stores copy of test output. +=end original + テスト出力ã®ã‚³ãƒ”ãƒ¼ã‚’æ ¼ç´ã™ã‚‹ãƒãƒƒãƒ•ã‚¡ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹ã‚’è¿”ã—ã¾ã™. =head2 print (@array) +=begin original + Prints data in <@array> either into string (if test parameter C<output_ref> is set) or to some filehandle (if test parameter C<fh_out> is set) or to standard output. + +=end original + <@array> ã®ä¸ã®ãƒ‡ãƒ¼ã‚¿ã‚’æ–‡å—列ã®ä¸(テストパラメータ C<output_ref> ㌠è¨å®šã•ã‚Œã¦ã„ãŸã¨ã)ã‚‚ã—ãã¯ãƒ•ã‚¡ã‚¤ãƒ«ãƒãƒ³ãƒ‰ãƒ«(テストパラメータ C<fh_out> ãŒè¨å®šã•ã‚Œã¦ã„ãŸã¨ã)ã‚‚ã—ãã¯æ¨™æº–出力㫠出力ã—ã¾ã™. ->> +=begin original + Also stores this data into buffer accessible via method C<test_output>. +=end original + ã“ã®ãƒ‡ãƒ¼ã‚¿ã¯ C<test_output> メソッドを通ã—ã¦ãƒãƒƒãƒ•ã‚¡ã¸ã®æ ¼ç´ã‚‚ ã§ãã¾ã™. =head2 start_tests () +=begin original + This method is called by L<HTTP::WebTest|HTTP::WebTest> at the beginning of the test run. Its implementation in this class initializes the output buffer for the test report. +=end original + ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ãƒ†ã‚¹ãƒˆã®é–‹å§‹æ™‚ã« L<HTTP::WebTest|HTTP::WebTest> ã‹ã‚‰ 呼ã³å‡ºã•ã‚Œã¾ã™. ã“ã®ã‚¯ãƒ©ã‚¹ã®å®Ÿè£…ã§ã¯ãƒ†ã‚¹ãƒˆãƒ¬ãƒãƒ¼ãƒˆç”¨ã®å‡ºåŠ›ãƒãƒƒãƒ•ã‚¡ã‚’ åˆæœŸåŒ–ã—ã¾ã™. +=begin original + If you redefine this method in a subclass, be sure to call the superclass method in the new method: +=end original + ã‚‚ã—サブクラスã§ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’å†å®šç¾©ã™ã‚‹ã®ãªã‚‰, æ–°ã—ã„メソッドã®ä¸ã§ã‚¹ãƒ¼ãƒ‘ークラスã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã—ã¦ãã ã•ã„: @@ -276,17 +384,25 @@ =head2 end_tests () +=begin original + This method is called by L<HTTP::WebTest|HTTP::WebTest> at the end of a test run. Its implementation in this class e-mails the test report according test parameters C<mail***>. +=end original + ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ãƒ†ã‚¹ãƒˆã®çµ‚了時㫠L<HTTP::WebTest|HTTP::WebTest> ã‹ã‚‰ 呼ã³å‡ºã•ã‚Œã¾ã™. ã“ã®ã‚¯ãƒ©ã‚¹ã®å®Ÿè£…ã§ã¯ãƒ†ã‚¹ãƒˆãƒ‘ラメータ C<mail***> ã«å¾“ã£ã¦ãƒ†ã‚¹ãƒˆãƒ¬ãƒãƒ¼ãƒˆã‚’ e-mail ã§é€ä¿¡ã—ã¾ã™. +=begin original + If you redefine this method in subclass be sure to call the superclass method in the new method: +=end original + ã‚‚ã—サブクラスã§ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’å†å®šç¾©ã™ã‚‹ã®ãªã‚‰, æ–°ã—ã„メソッドã®ä¸ã§ã‚¹ãƒ¼ãƒ‘ークラスã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã—ã¦ãã ã•ã„: @@ -300,19 +416,21 @@ } =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<HTTP::WebTest|HTTP::WebTest> Index: docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Request.pod diff -u docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Request.pod:1.2 docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Request.pod:1.3 --- docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Request.pod:1.2 Thu Jan 27 22:14:56 2011 +++ docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Request.pod Thu Nov 29 22:36:11 2012 @@ -2,14 +2,16 @@ =encoding utf8 =head1 NAME -åå‰ + +=begin original HTTP::WebTest::Request - HTTP request objects +=end original + HTTP::WebTest::Request - HTTP リクエストオブジェクト =head1 SYNOPSIS -æ¦‚è¦ use HTTP::WebTest::Request; $request = HTTP::WebTest::Request->new; @@ -23,18 +25,23 @@ $request->params([@params]); =head1 DESCRIPTION -説明 + +=begin original This class is a subclass of L<HTTP::Request|HTTP::Request> class. It extends it with continence methods that allow to set or get CGI query params for HTTP request in uniform way independent of HTTP request method. +=end original + ã“ã®ã‚¯ãƒ©ã‚¹ã¯ L<HTTP::Request|HTTP::Request> クラスã®ã‚µãƒ–クラスã§ã™. HTTP リクエストメソッドã‹ã‚‰ç‹¬ç«‹ã—ãŸçµ±ä¸€ã—ãŸæ–¹æ³•ã§ã® HTTP リクエスト㮠CGI パラメータã®è¨å®šã‚‚ã—ãã¯å–得を許å¯ã™ã‚‹ 自制的ãªãƒ¡ã‚½ãƒƒãƒ‰ã‚’æ‹¡å¼µã—ã¦ã„ã¾ã™. +=begin original + Each URI in GET requests may consist of two portions: URI of document/resource/etc and CGI query string. In L<HTTP::Request|HTTP::Request> method C<uri> doesn't separate them and @@ -43,6 +50,8 @@ it methods C<base_uri> and C<params> should be used to change or get these parts independently. +=end original + GET リクエスト㮠URI ã¯ï¼’ã¤ã®éƒ¨åˆ†, ドã‚ュメント/リソースç‰ã® URI åŠã³ CGI クエリ文å—列ã‹ã‚‰ãªã‚Šã¾ã™. L<HTTP::Request|HTTP::Request> ã® C<uri> メソッドã§ã¯ã“れらãŒåˆ†é›¢ã•ã‚Œã¦ãŠã‚‰ãšï¼‘ã¤ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¨ã—㦠@@ -51,111 +60,161 @@ C<base_uri> åŠã³ C<params> メソッドã§å€‹ã€…ã®éƒ¨åˆ†ã‚’独立ã—ã¦å¤‰æ›´ã‚‚ã—ã㯠å–å¾—ã—ã¾ã™. +=begin original + For POST requests method C<base_uri> acts simular to C<uri>. On the other hand C<params> set content of HTTP request in case of POST requests. +=end original + POST リクエストã§ã¯ C<base_uri> 㯠C<uri> ã¨ã‚ˆãä¼¼ã¦ã„ã¾ã™. 言ã„æ›ãˆã‚‹ã¨ POST リクエストã§ã¯ C<params> ㌠HTTP リクエスト㮠本体をè¨å®šã—ã¾ã™. +=begin original + CGI request parameters are defined in the way similar to CGI request parameters defenition in L<HTTP::Request::Common|HTTP::Request::Common>. It is an array of pairs +=end original + CGI リクエストã®ãƒ‘ラメータ㯠L<HTTP::Request::Common|HTTP::Request::Common> ã§å®šç¾©ã•ã‚Œã‚‹ CGI リクエストパラメータã®å®šç¾©ã¨ã‚ˆãä¼¼ãŸæ–¹æ³•ã§å®šç¾©ã•ã‚Œã¾ã™. ペアã®é…列を用ã„る方法ã§ã™. ( name1 => value1, name2 => value2, ..., nameN => valueN ) +=begin original + If any value is passed as an array reference it is treated as file upload. See L<HTTP::Request::Common|HTTP::Request::Common> for more details. +=end original + ã‚‚ã—値ãŒé…列ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹ã¨ã—ã¦æ¸¡ã•ã‚Œã‚‹ã¨ ファイルã®ã‚¢ãƒƒãƒ—ãƒãƒ¼ãƒ‰ã¨ã—ã¦å‡¦ç†ã•ã‚Œã¾ã™. 詳細㯠L<HTTP::Request::Common|HTTP::Request::Common> ã‚’å‚ç…§ã—ã¦ãã ã•ã„. +=begin original + By default GET type of HTTP request is assumed. But if CGI request parameters have data for file upload then POST type of HTTP request is assumed. +=end original + デフォルトã§ã¯ HTTP リクエスト㫠GET ãŒä½¿ã‚ã‚Œã¾ã™. ã—ã‹ã—ã‚‚ã— CGI リクエストパラメータã«ãƒ•ã‚¡ã‚¤ãƒ«ã‚¢ãƒƒãƒ—ãƒãƒ¼ãƒ‰ãŒã‚る㨠POST ãŒä½¿ã‚ã‚Œã¾ã™. =head1 CLASS METHODS -クラスメソッド + +(クラスメソッド) =head2 base_uri($optional_uri) +=begin original + Can set non CGI query portion of request URI if C<$optional_uri> is passed. +=end original + C<$optional_uri> ãŒæ¸¡ã•ã‚Œã‚‹ã¨ リクエスト URI ã® CGI クエリ部分ã§ãªã„ 箇所をè¨å®šã—ã¾ã™. =head3 Returns -復帰値 + +(復帰値) + +=begin original Non CGI query portion of request URI. +=end original + リクエスト URI ã® CGI クエリ部分ã§ãªã„箇所. =head2 uri($optional_uri) +=begin original + Method C<uri> is redefined. It is same as C<base_uri> for non-GET request. For GET requests it returns URI with query parameters. +=end original + C<uri> メソッドã¯å†å®šç¾©ã•ã‚Œã¦ã„ã¾ã™. ã“れ㯠GET ã§ãªã„リクエストã«å¯¾ã—ã¦ã¯ C<base_uri> ã¨åŒã˜ã§ã™. GET リクエストã§ã‚ã‚Œã°ã‚¯ã‚¨ãƒªãƒ‘ラメータをå«ã‚“ã URI ã‚’è¿”ã—ã¾ã™. =head3 Returns -復帰値 + +(復帰値) + +=begin original Whole URI. +=end original + 完全㪠URI. =head2 content_ref +=begin original + Method C<content_ref> is redefined. For POST requests it returns POST query content corresponding to query parameters. +=end original + C<content_ref> メソッドã¯å†å®šç¾©ã•ã‚Œã¦ã„ã¾ã™. POST リクエストã§ã‚れ㰠クエリパラメータã«å¯¾å¿œã™ã‚‹ã‚¯ã‚¨ãƒªæœ¬ä½“ã‚’è¿”ã—ã¾ã™. =head2 params($optional_params) +=begin original + Can set CGI request parameters for this HTTP request object if an array reference C<$optional_params> is passed. +=end original + é…列リファレンス C<$optional_params> ãŒæ¸¡ã•ã‚Œã‚‹ã¨ HTTP リクエスト オブジェクト㮠CGI リクエストパラメータをè¨å®šã—ã¾ã™. =head3 Returns -復帰値 + +(復帰値) + +=begin original An reference to an array that contains CGI request parameters. +=end original + CGI リクエストパラメータをå«ã‚“ã é…列ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. =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<HTTP::WebTest|HTTP::WebTest> Index: docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/SelfTest.pod diff -u docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/SelfTest.pod:1.2 docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/SelfTest.pod:1.3 --- docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/SelfTest.pod:1.2 Thu Jan 27 22:14:56 2011 +++ docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/SelfTest.pod Thu Nov 29 22:36:11 2012 @@ -2,159 +2,239 @@ =encoding utf8 =head1 NAME -åå‰ + +=begin original HTTP::WebTest::SelfTest - Helper package for HTTP::WebTest test suite +=end original + HTTP::WebTest::SelfTest - HTTP::WebTest テストスイート用ã®ãƒ˜ãƒ«ãƒ‘ーパッケージ =head1 SYNOPSIS -æ¦‚è¦ use HTTP::WebTest::SelfTest; =head1 DESCRIPTION -説明 + +=begin original This module provides helper routines used by L<HTTP::WebTest> self test suite. Plugin writers may find this module useful for implementation of test suites for their plugins. +=end original + ã“ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã§ã¯ L<HTTP::WebTest> 自身ã®ãƒ†ã‚¹ãƒˆã‚¹ã‚¤ãƒ¼ãƒˆã§ä½¿ã‚れる ヘルパーメソッドをæä¾›ã—ã¾ã™. プラグインã®åˆ¶ä½œè€…ã¯ä½œã£ã¦ã„るプラグイン㮠テストスイートã®å®Ÿè£…ã«å½¹ç«‹ã¤ã‚‚ã®ãŒè¦‹ä»˜ã‹ã‚‹ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“. =head1 GLOBAL VARIABLES -ã‚°ãƒãƒ¼ãƒãƒ«å¤‰æ•° + +(ã‚°ãƒãƒ¼ãƒãƒ«å¤‰æ•°) + +=begin original This module imports in namespace of test script following global variables. +=end original + ã“ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã¯ä»¥ä¸‹ã®ã‚°ãƒãƒ¼ãƒãƒ«å¤‰æ•°ã‚’テストスクリプトã®åå‰ç©ºé–“㫠インãƒãƒ¼ãƒˆã—ã¾ã™. =head2 $HOSTNAME +=begin original + The hostname of the test webserver. +=end original + テストウェブサーãƒã®ãƒ›ã‚¹ãƒˆå. =head2 $PORT +=begin original + The port of the test webserver. +=end original + テストウェブサーãƒã®ãƒãƒ¼ãƒˆ. =head2 $URL +=begin original + The URL of the test webserer. +=end original + テストウェブサーãƒã® URL. =head1 SUBROUTINES -サブルーティン + +(サブルーティン) + +=begin original This module imports in namespace of test script following helper subroutines. +=end original + ã“ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã¯ä»¥ä¸‹ã®ãƒ˜ãƒ«ãƒ‘関数をテストスクリプトã®åå‰ç©ºé–“㫠インãƒãƒ¼ãƒˆã—ã¾ã™. =head2 abs_url($base, $rel) =head3 Return -復帰値 + +(復帰値) + +=begin original Returns absolute URL based on pair of base and relative URLs. +=end original + ベースåŠã³ç›¸å¯¾ URL ã®ãƒšã‚¢ã‹ã‚‰ãªã‚‹çµ¶å¯¾ URL ã‚’è¿”ã—ã¾ã™. =head2 read_file($filename, $ignore_errors) +=begin original + Reads a file. +=end original + ファイルをèªã¿è¾¼ã¿ã¾ã™. =head3 Parameters -パラメータ + +(パラメータ) =over 4 =item $filename +=begin original + Name of the file. +=end original + ファイルã®åå‰. =item $ignore_errors +=begin original + (Optional) If true then open file errors are ignored, otherwise they raise an exception. If omit defaults to true. +=end original + (ä»»æ„) æ»ã‚“ã§ã‚ã‚Œã°ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é–‹ãã¨ãã®ã‚¨ãƒ©ãƒ¼ã¯ç„¡è¦–ã•ã‚Œã¾ã™. ãã†ã§ãªã‘ã‚Œã°ä¾‹å¤–を発生ã•ã›ã¾ã™. çœç•¥æ™‚ã¯çœŸã§ã™. =back =head3 Returns -復帰値 + +(復帰値) + +=begin original Whole content of the file as a string. +=end original + ファイルã®ä¸èº«å…¨ä½“ã‚’æ–‡å—列ã¨ã—ã¦è¿”ã—ã¾ã™. =head2 write_file($filename, $data) +=begin original + Writes into a file. +=end original + ファイルã«æ›¸ãè¾¼ã¿. =head3 Parameters -パラメータ + +(パラメータ) =over 4 =item $filename +=begin original + Name of the file. +=end original + ファイルå. =item $data +=begin original + Data to write into the file. +=end original + ファイルã«æ›¸ã込むデータ. =back =head2 check_webtest(%params) +=begin original + Runs a test sequence and compares output with a reference file. +=end original + テストシーケンスを実行ã—ã¦ãã®å‡ºåŠ›ã‚’リファレンスファイルã¨æ¯”較ã—ã¾ã™. =head3 Parameters -パラメータ + +(パラメータ) =over 4 =item webtest => $webtest +=begin original + L<HTTP::WebTest> object to be used for running the test sequence. +=end original + テストシーケンスã®å®Ÿè¡Œã«ä½¿ã† L<HTTP::WebTest> オブジェクト. =item tests => $tests +=begin original + The test sequence. +=end original + テストシーケンス. =item tests => $opts +=begin original + The global parameters for the test sequence. +=end original + テストシーケンスã®ãŸã‚ã®ã‚°ãƒãƒ¼ãƒãƒ«ãƒ‘ラメータ. (訳注: 原文ã§ã¯ C<tests => $opts> ã¨ãªã£ã¦ã„ãŸãŒæらã誤り.) @@ -164,76 +244,110 @@ =head2 generate_testfile(%params) +=begin original + Generates test file from template file. I.e. it replaces substring '<<SERVER_URL>>' with value of named parameter C<server_url>. +=end original + テンプレートファイルã‹ã‚‰ãƒ†ã‚¹ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã‚’生æˆ. 部分文å—列 '<<SERVER_URL>>' ã¯åå‰ä»˜ãパラメータ C<server_url> ã®å€¤ã§ ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™. =head3 Parameters -パラメータ + +(パラメータ) =over 4 =item file => $file +=begin original + Filename of test file. Template file is expected to be in file named "$file.in". +=end original + テストファイルã®ãƒ•ã‚¡ã‚¤ãƒ«å. テンプレートファイル㯠"$file.in" ã®åå‰ã‚’ ã‚‚ã¤å¿…è¦ãŒã‚ã‚Šã¾ã™. =item server_url => $server_url +=begin original + Test webserver URL. +=end original + テストサーãƒã® URL. =back =head2 canonical_output(%params) +=begin original + Some substrings in test output are unique for each test run. This subroutine "fixes" test output so it becomes repeatable (unless tests get broken). +=end original + テストã®å‡ºåŠ›ä¸ã®ã„ãã¤ã‹ã®éƒ¨åˆ†æ–‡å—列をå„テストã®å®Ÿè¡Œæ¯Žã«ãƒ¦ãƒ‹ãƒ¼ã‚¯ãª ã‚‚ã®ã«ç½®ãæ›ãˆã¾ã™. ã“ã®é–¢æ•°ã§ã¯ãƒ†ã‚¹ãƒˆã®å‡ºåŠ›ã‚’"ä¿®æ£"ã™ã‚‹ãŸã‚(テスト㌠壊れã¦ã„ãªã„é™ã‚Šã¯)ç¹°ã‚Šè¿”ã—å¯èƒ½ã§ã™. =head3 Parameters -パラメータ + +(パラメータ) =over 4 =item output_ref => $output_ref +=begin original + A reference on scalar which contains test output as whole string. +=end original + テストã®çµæžœã‚’æ–‡å—列全体ã¨ã—ã¦æ ¼ç´ã™ã‚‹ã‚¹ã‚«ãƒ©ãƒ¼ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. =item out_filter => $out_filter +=begin original + An optional reference on subroutine which can be used as additional filter. It gets passed test output as its first parameter. +=end original + è¿½åŠ ãƒ•ã‚£ãƒ«ã‚¿ã¨ã—ã¦ä½¿ã‚れる関数ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. ä»»æ„. 1番目ã®å¼•æ•°ã« テストã®å‡ºåŠ›ãŒæ¸¡ã•ã‚Œã¾ã™. =item server_url => $server_url +=begin original + Test webserver URL. Normally it is unique for each test run so it gets replaced with C<http://http.web.test/>. +=end original + ウェブサームURL をテストã—ã¾ã™. 通常ã“ã‚Œã¯å„テストã®å®Ÿè¡Œæ¯Žã«ãƒ¦ãƒ‹ãƒ¼ã‚¯ ã§ã‚ã‚‹ãŸã‚ C<http://http.web.test/> ã§ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™. =item server_hostname => $server_hostname +=begin original + Test webserver URL. Normally it is unique for each machine where test is run so it gets replaced with C<http.web.test>. +=end original + ウェブサームURL をテストã—ã¾ã™. 通常ã“ã‚Œã¯å„マシン毎ã«ãƒ¦ãƒ‹ãƒ¼ã‚¯ ã§ã‚ã‚‹ãŸã‚ C<http.web.test> ã§ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™. @@ -241,89 +355,126 @@ =head2 compare_output(%params) +=begin original + Tests if a test output matches content of specified reference file. If environment variable C<TEST_FIX> is set then the test is always succeed and the content of the reference file is overwritten with current test output. +=end original + テスト出力ãŒæŒ‡å®šã•ã‚ŒãŸãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã®å†…容ã¨ä¸€è‡´ã™ã‚‹ã‹ãƒ†ã‚¹ãƒˆã—ã¾ã™. ã‚‚ã—環境変数 C<TEST_FIX> ãŒè¨å®šã•ã‚Œã¦ã„ã‚Œã°ãƒ†ã‚¹ãƒˆã¯å¸¸ã«æˆåŠŸã—, リファレンスファイルã®å†…容をテストçµæžœã§ä¸Šæ›¸ãã—ã¾ã™. =head3 Parameters -パラメータ + +(パラメータ) =over 4 =item output_ref => $output_ref +=begin original + A reference on scalar which contains test output as whole string. +=end original + テストã®çµæžœã‚’æ–‡å—列全体ã¨ã—ã¦æ ¼ç´ã™ã‚‹ã‚¹ã‚«ãƒ©ãƒ¼ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. =item check_file => $check_file +=begin original + Filename of the reference file. +=end original + リファレンスファイルã®ãƒ•ã‚¡ã‚¤ãƒ«å. =back =head2 parse_basic_credentials($credentials) +=begin original + Decodes credentials for Basic authorization scheme according RFC2617. +=end original + RFC 2617 ã«å¯¾å¿œã™ã‚‹ãƒ™ãƒ¼ã‚·ãƒƒã‚¯èªè¨¼ã‚¹ã‚ーマã®ãƒ‡ã‚³ãƒ¼ãƒ‰ã‚’è¡Œã„ã¾ã™. =head3 Returns -復帰値 + +(復帰値) + +=begin original Returns user/password pair. +=end original + ユーザ/パスワードã®ãƒšã‚¢. =head1 DEPRECATED SUBROUTINES -廃æ¢ã•ã‚ŒãŸé–¢æ•° + +(廃æ¢ã•ã‚ŒãŸé–¢æ•°) + +=begin original 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. +=end original + ã“ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã¯ä»¥ä¸‹ã®ãƒ˜ãƒ«ãƒ‘関数もテストスクリプトã®åå‰ç©ºé–“㫠インãƒãƒ¼ãƒˆã—ã¾ã™ãŒã“れらã¯å»ƒæ¢ã•ã‚Œã¦ã„ã¾ã™. 今後削除ã•ã‚Œã‚‹ã§ã—ょã†. =head2 start_webserver +=begin original + This subroutine was moved into L<HTTP::WebTest::Utils|HTTP::WebTest::Utils> but for backward compatibility purposes can be exported from this module. +=end original + ã“ã®é–¢æ•°ã¯ L<HTTP::WebTest::Utils|HTTP::WebTest::Utils> 㫠移動ã•ã‚Œã¾ã—ãŸ. 下ä½äº’æ›ã®ãŸã‚ã«ã“ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‹ã‚‰ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™. =head2 stop_webserver +=begin original + This subroutine was moved into L<HTTP::WebTest::Utils|HTTP::WebTest::Utils> but for backward compatibility purposes can be exported from this module. +=end original + ã“ã®é–¢æ•°ã¯ L<HTTP::WebTest::Utils|HTTP::WebTest::Utils> 㫠移動ã•ã‚Œã¾ã—ãŸ. 下ä½äº’æ›ã®ãŸã‚ã«ã“ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‹ã‚‰ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã•ã‚Œã¦ã„ã¾ã™. =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<HTTP::WebTest|HTTP::WebTest> Index: docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Test.pod diff -u docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Test.pod:1.2 docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Test.pod:1.3 --- docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Test.pod:1.2 Thu Jan 27 22:14:56 2011 +++ docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Test.pod Thu Nov 29 22:36:11 2012 @@ -2,14 +2,16 @@ =encoding utf8 =head1 NAME -åå‰ + +=begin original HTTP::WebTest::Test - Test object class +=end original + HTTP::WebTest::Test - テストオブジェクトクラス =head1 SYNOPSIS -æ¦‚è¦ use HTTP::WebTest::Test; @@ -32,135 +34,203 @@ $test->response_time($response_time); =head1 DESCRIPTION -説明 + +=begin original Objects of this class represent tests. They store both test parameters and test results. +=end original + ã“ã®ã‚¯ãƒ©ã‚¹ã®ã‚ªãƒ–ジェクトã§ã¯ãƒ†ã‚¹ãƒˆã‚’表ç¾ã—ã¾ã™. ã“れらã¯ãƒ†ã‚¹ãƒˆãƒ‘ラメータ㨠テストçµæžœã®ä¸¡æ–¹ã‚’æ ¼ç´ã—ã¾ã™. =head1 CLASS METHODS -クラスメソッド + +(クラスメソッド) =head2 new (%params) +=begin original + Constructor. +=end original + コンストラクタ. =head3 Parameters -パラメータ + +(パラメータ) =over 4 =item * %params +=begin original + A hash with test parameters. +=end original + テストパラメータã¨ãªã‚‹ãƒãƒƒã‚·ãƒ¥. =back =head3 Returns -復帰値 + +(復帰値) + +=begin original A new C<HTTP::WebTest::Test> object. +=end original + æ–°ã—ã„ C<HTTP::WebTest::Test> オブジェクト. =head2 params =head3 Returns -復帰値 + +(復帰値) + +=begin original A reference to a hash with all test parameters. +=end original + å…¨ã¦ã®ãƒ†ã‚¹ãƒˆãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ã‚’æ ¼ç´ã™ã‚‹ãƒãƒƒã‚·ãƒ¥ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. =head2 param ($param) =head3 Returns -復帰値 + +(復帰値) + +=begin original A value of test parameter named C<$param>. +=end original + C<$param> ã®åå‰ã‚’æŒã¤ãƒ†ã‚¹ãƒˆãƒ‘ラメータã®å€¤. =head2 results ($optional_results) +=begin original + Can set L<HTTP::WebTest::TestResult|HTTP::WebTest::TestResult> objects for this C<HTTP::WebTest::Test> object if an array reference C<$optional_results> is passed. +=end original + ã‚‚ã—é…列リファレンス C<$optional_results> ãŒæ¸¡ã•ã‚Œã‚‹ã¨ã“ã® C<HTTP::WebTest::Test> オブジェクト用㮠L<HTTP::WebTest::TestResult|HTTP::WebTest::TestResult> ã‚’è¨å®šã—ã¾ã™. =head3 Returns -復帰値 + +(復帰値) + +=begin original A reference to an array that contains L<HTTP::WebTest::TestResult|HTTP::WebTest::TestResult> objects. +=end original + L<HTTP::WebTest::TestResult|HTTP::WebTest::TestResult> ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã® ã‚’æ ¼ç´ã™ã‚‹é…列ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. =head2 request ($optional_request) +=begin original + If parameter C<$optional_request> is passed, set L<HTTP::Request|HTTP::Request> object for this C<HTTP::WebTest::Test> object. +=end original + パラメータ C<$optional_request> ãŒæ¸¡ã•ã‚Œã‚‹ã¨ã“ã® C<HTTP::WebTest::Test> オブジェクト用㮠L<HTTP::Request|HTTP::Request> オブジェクトをè¨å®šã—ã¾ã™. =head3 Returns -復帰値 + +(復帰値) + +=begin original A L<HTTP::Request|HTTP::Request> object. +=end original + L<HTTP::Request|HTTP::Request> オブジェクト. =head2 response ($optional_response) +=begin original + If parameter C<$optional_response> is passed, set L<HTTP::Response|HTTP::Response> object for this C<HTTP::WebTest::Test> object. +=end original + パラメータ C<$optional_response> ãŒæ¸¡ã•ã‚Œã‚‹ã¨ã“ã® C<HTTP::WebTest::Test> オブジェクト用㮠L<HTTP::Response|HTTP::Response> オブジェクトを è¨å®šã—ã¾ã™. =head3 Returns -復帰値 + +(復帰値) + +=begin original A L<HTTP::Response|HTTP::Response> object. +=end original + L<HTTP::Response|HTTP::Response> オブジェクト. =head2 response_time ($optional_response_time) +=begin original + If parameter C<$optional_response_time> is passed, set response time for this C<HTTP::WebTest::Test> object. +=end original + パラメータ C<$optional_response_time> ãŒæ¸¡ã•ã‚Œã‚‹ã¨ã“ã® C<HTTP::WebTest::Test> オブジェクト用ã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚¿ã‚¤ãƒ ã‚’è¨å®šã—ã¾ã™. =head3 Returns -復帰値 + +(復帰値) + +=begin original A response time. +=end original + レスãƒãƒ³ã‚¹ã‚¿ã‚¤ãƒ . =head2 convert ($test) +=begin original + Tries to convert test definition in some form into C<HTTP::WebTest::Test> object. Currenlty supports test defintion in form of C<HTTP::WebTest::Test> object (it is just passed through) or in the form of hash reference: +=end original + ã‚ã‚‹å½¢å¼ã§å®šç¾©ã•ã‚ŒãŸãƒ†ã‚¹ãƒˆã‚’ C<HTTP::WebTest::Test> オブジェクト㫠変æ›ã‚’試ã¿ã¾ã™. ç¾åœ¨ã®ã¨ã“ã‚㯠C<HTTP::WebTest::Test> オブジェクト㮠形å¼ã‚‚ã—ãã¯ä»¥ä¸‹ã®ã‚ˆã†ãªãƒãƒƒã‚·ãƒ¥ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹ã®å½¢å¼ã®ãƒ†ã‚¹ãƒˆå®šç¾©ã‚’ @@ -169,32 +239,43 @@ { test_param1 => test_value1, test_param2 => test_value2 } =head3 Returns -復帰値 + +(復帰値) + +=begin original A new C<HTTP::WebTest::Test> object. +=end original + æ–°ã—ã„ C<HTTP::WebTest::Test> オブジェクト. =head2 reset () +=begin original + Resets test object +=end original + テストオブジェクトをリセットã—ã¾ã™. =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<HTTP::WebTest|HTTP::WebTest> Index: docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/TestResult.pod diff -u docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/TestResult.pod:1.2 docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/TestResult.pod:1.3 --- docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/TestResult.pod:1.2 Thu Jan 27 22:14:56 2011 +++ docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/TestResult.pod Thu Nov 29 22:36:11 2012 @@ -2,14 +2,16 @@ =encoding utf8 =head1 NAME -åå‰ + +=begin original HTTP::WebTest::TestResult - Test results class +=end original + HTTP::WebTest::TestResult - テストçµæžœã‚¯ãƒ©ã‚¹ =head1 SYNOPSIS -æ¦‚è¦ use HTTP::WebTest::TestResult; @@ -23,86 +25,127 @@ if($result) { ... } =head1 DESCRIPTION -説明 + +=begin original Objects of this class represent test results. Test results are basicly C<ok>/C<not ok> and some attached commentary. +=end original + ã“ã®ã‚¯ãƒ©ã‚¹ã®ã‚ªãƒ–ジェクトã¯ãƒ†ã‚¹ãƒˆçµæžœã‚’表ç¾ã—ã¾ã™. テストçµæžœã¯ 基本的㪠C<ok>/C<not ok> ã¨, è¿½åŠ ã®ã‚³ãƒ¡ãƒ³ãƒˆã‚’æŒã£ã¦ã„ã¾ã™. +=begin original + This class overloads C<bool> operation so it can be directly used in statements that require boolean values. +=end original + ã“ã®ã‚¯ãƒ©ã‚¹ã¯ C<bool> æ“作をオーãƒãƒ¼ãƒãƒ¼ãƒ‰ã—ã¦ã„ã¾ã™. ãã®ç‚º 真å½å€¤ãŒå¿…è¦ãªç®‡æ‰€ã§ç›´æŽ¥ä½¿ã†ã“ã¨ãŒã§ãã¾ã™. if($result) { ... } +=begin original + is equivalent to +=end original + ã“ã‚Œã¯æ¬¡ã®å¼ã¨ç‰å€¤ã§ã™. if($result->ok) { ... } =head1 CLASS METHODS -クラスメソッド + +(クラスメソッド) =head2 new () +=begin original + Constructor +=end original + コンストラクタ =head3 Returns -復帰値 + +(復帰値) + +=begin original A new C<HTTP::WebTest::TestResult> object. +=end original + æ–°ã—ã„ C<HTTP::WebTest::TestResult> オブジェクト. =head2 ok ($optional_ok) +=begin original + If C<$optional_ok> is passed, Defines whether or not test is successful. +=end original + ã‚‚ã— C<$optional_ok> ãŒæ¸¡ã•ã‚ŒãŸã®ãªã‚‰ãƒ†ã‚¹ãƒˆãŒæˆåŠŸã—ãŸã‹ã©ã†ã‹ã‚’ 定義ã—ã¾ã™. =head3 Returns -復帰値 + +(復帰値) + +=begin original True if test is successful. False otherwise. +=end original + テストãŒæˆåŠŸã ã£ãŸã®ãªã‚‰çœŸã‚’, ãã†ã§ãªã‘ã‚Œã°å½ã‚’è¿”ã—ã¾ã™. =head2 comment ($optional_comment) +=begin original + If C<$optional_comment> is passed, sets test result comment. +=end original + C<$optional_comment> ãŒæ¸¡ã•ã‚Œã‚Œã°ãƒ†ã‚¹ãƒˆçµæžœã®ã‚³ãƒ¡ãƒ³ãƒˆã‚’è¨å®šã—ã¾ã™. =head3 Returns -復帰値 + +(復帰値) + +=begin original A test result comment. +=end original + テストçµæžœã®ã‚³ãƒ¡ãƒ³ãƒˆ. =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<HTTP::WebTest|HTTP::WebTest> Index: docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Utils.pod diff -u docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Utils.pod:1.2 docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Utils.pod:1.3 --- docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Utils.pod:1.2 Thu Jan 27 22:14:56 2011 +++ docs/modules/HTTP-WebTest-2.04/lib/HTTP/WebTest/Utils.pod Thu Nov 29 22:36:11 2012 @@ -2,14 +2,16 @@ =encoding utf8 =head1 NAME -åå‰ + +=begin original HTTP::WebTest::Utils - Miscellaneous subroutines used by HTTP::WebTest +=end original + HTTP::WebTest::Utils - HTTP::WebTest ã§ä½¿ã†æ§˜ã€…ãªé–¢æ•°ç¾¤ =head1 SYNOPSIS -æ¦‚è¦ use HTTP::WebTest::Utils; @@ -29,12 +31,15 @@ die $@ if $@; =head1 DESCRIPTION -説明 + +=begin original This packages contains utility subroutines used by L<HTTP::WebTest|HTTP::WebTest>. All of them can be exported but none of them is exported by default. +=end original + ã“ã®ãƒ‘ッケージã«ã¯ L<HTTP::WebTest|HTTP::WebTest> ãŒä½¿ã†ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£é–¢æ•° ãŒå«ã¾ã‚Œã¦ã„ã¾ã™. å…¨ã¦ã®é–¢æ•°ã¯ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆå¯èƒ½ã§ã™ãŒãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§ã¯ 何もエクスãƒãƒ¼ãƒˆã•ã‚Œã¾ã›ã‚“. @@ -43,36 +48,53 @@ =head2 make_access_method($field, $optional_default_value) +=begin original + Creates anonymous subroutine which can be used as accessor method. Method can be used with objects that are blessed hashes. +=end original + アクセサメソッドã¨ã—ã¦ä½¿ãˆã‚‹ç„¡å関数を生æˆã—ã¾ã™. メソッドã¯ãƒãƒƒã‚·ãƒ¥ã‚’ブレスã—ãŸã‚ªãƒ–ジェクトã«å¯¾ã—ã¦ä½¿ç”¨ã§ãã¾ã™. +=begin original + Typical usage is +=end original + 典型的ãªä½¿ã„æ–¹ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: *method = make_access_method($field, ...); =head3 Parameters -パラメータ + +(パラメータ) =over 4 =item * $field +=begin original + A hash field used for created accessor method. +=end original + アクセサメソッドを作るã¨ãã«ä½¿ã†ãƒãƒƒã‚·ãƒ¥ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰å. =item * $optional_default_value +=begin original + If C<$optional_default_value> is a code reference, uses values returned by its execution as default for created accessor method. Otherwise, uses C<$optional_default_value> as name of method which returns default value for created accessor method. +=end original + C<$optional_default_value> ãŒã‚³ãƒ¼ãƒ‰ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹ã§ã‚ã‚Œã°, アクセサメソッドを作るã¨ãã«ãれを実行ã—ãŸçµæžœã®å€¤ã‚’デフォルト値ã¨ã—㦠使ã„ã¾ã™. ãã†ã§ãªã‘ã‚Œã°ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’è¿”ã™ãƒ¡ã‚½ãƒƒãƒ‰ã®åå‰ã¨ã—㦠@@ -81,40 +103,59 @@ =back =head3 Returns -復帰値 + +(復帰値) =head2 find_port (hostname => $hostname) =head3 Returns -復帰値 + +(復帰値) + +=begin original Free port number for network interface specified by C<$hostname>. +=end original + C<$hostname> ã§æŒ‡å®šã•ã‚ŒãŸãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ã‚«ãƒ¼ãƒ‰ã§ 空ã„ã¦ã„ã‚‹ãƒãƒ¼ãƒˆç•ªå·. =head2 start_webserver(%params) +=begin original + Starts separate process with a test webserver. +=end original + 別プãƒã‚»ã‚¹ã§ãƒ†ã‚¹ãƒˆã‚¦ã‚§ãƒ–サーãƒã‚’èµ·å‹•ã—ã¾ã™. =head3 Parameters -パラメータ + +(パラメータ) =over 4 =item port => $port +=begin original + A port number where the test webserver listens for incoming connections. +=end original + コãƒã‚¯ã‚·ãƒ§ãƒ³ã‚’å—ã‘付ã‘ã‚‹ãŸã‚ã«ãƒ†ã‚¹ãƒˆã‚¦ã‚§ãƒ–サーãƒãŒlistenã™ã‚‹ãƒãƒ¼ãƒˆç•ªå·. =item server_sub => $server_sub +=begin original + A reference on a subroutine to handle requests. It get passed two named parameters: C<connect> and C<request>. +=end original + リクエストを処ç†ã™ã‚‹é–¢æ•°ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. 関数ã«ã¯ï¼’ã¤ã®åå‰ä»˜ãパラメータ C<connect> åŠã³ C<request> ãŒæ¸¡ã•ã‚Œã¾ã™. @@ -122,62 +163,94 @@ =head2 stop_webserver($pid) +=begin original + Kills a test webserver specified by its PID. +=end original + 指定ã•ã‚ŒãŸ PID ã‚’æŒã¤ãƒ†ã‚¹ãƒˆã‚¦ã‚§ãƒ–サーãƒã‚’ kill ã—ã¾ã™. =head2 copy_dir ($src_dir, $dst_dir) +=begin original + Copies directiory recursively. +=end original + ディレクトリをå†å¸°çš„ã«ã‚³ãƒ”ーã—ã¾ã™. =head2 load_package ($package) +=begin original + Loads package unless it is already loaded. +=end original + ã¾ã ãƒãƒ¼ãƒ‰ã•ã‚Œã¦ã„ãªã‘ã‚Œã°ãã®ãƒ‘ッケージをãƒãƒ¼ãƒ‰ã—ã¾ã™. =head2 eval_in_playground ($code) +=begin original + Evaluates perl code inside playground package. +=end original + playground パッケージã®ä¸ã§ perl コードを評価ã—ã¾ã™. =head3 Returns -復帰値 + +(復帰値) + +=begin original A return value of evaluated code. +=end original + 評価ã—ãŸã‚³ãƒ¼ãƒ‰ã®å¾©å¸°å€¤. =head2 make_sub_in_playground ($code) +=begin original + Create anonymous subroutine inside playground package. +=end original + playground パッケージã®ä¸ã§ç„¡å関数を生æˆã—ã¾ã™. =head3 Returns -復帰値 + +(復帰値) + +=begin original A reference on anonymous subroutine. +=end original + ç„¡å関数ã¸ã®ãƒªãƒ•ã‚¡ãƒ¬ãƒ³ã‚¹. =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<HTTP::WebTest|HTTP::WebTest>