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 + ï¼ã¤ã®è¦ç´ ãæã¤ãªã¹ã. ï¼ã¤ç®ã¯ãã¹ããªãã¸ã§ã¯ããæ ¼ç´ããé åã¸ã® ãªãã¡ã¬ã³ã¹. ï¼ã¤ç®ã¯ä»»æã®ã°ãã¼ãã«ãã¹ããã©ã¡ã¼ã¿å«ãã ããã·ã¥ã¸ã® ãªãã¡ã¬ã³ã¹. +=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 + ï¼ã¤ã®ãã¹ããå®è¡. =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 @@ ï¼ã¤ã®ãã¹ãã¹ã¯ãªããã®ä¸ã«ããããèªç±ã«åãæ··ãããã¨ãã§ãã¾ã. =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 + ï¼ã¤ãã®æå®ã§ã¯ãã¹ããã©ã¡ã¼ã¿ã 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> ãã¹ããã©ã¡ã¼ã¿ã§æå®ããã¦ããï¼ã¤ã¾ãã¯ãã以ä¸ã® ã¢ãã¬ã¹ã« 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 + ï¼ã¤ã® 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 + ï¼ã¤ã¾ãã¯ãã以ä¸ã®ãã¹ãã失æããã¨ãã«ã ã 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 + 追å ãã£ã«ã¿ã¨ãã¦ä½¿ãããé¢æ°ã¸ã®ãªãã¡ã¬ã³ã¹. ä»»æ. ï¼çªç®ã®å¼æ°ã« ãã¹ãã®åºåã渡ããã¾ã. =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>