2 |
=encoding utf8 |
=encoding utf8 |
3 |
|
|
4 |
=head1 NAME |
=head1 NAME |
5 |
名前 |
|
6 |
|
=begin original |
7 |
|
|
8 |
HTTP::WebTest::ReportPlugin - Subclass for HTTP::WebTest report plugins. |
HTTP::WebTest::ReportPlugin - Subclass for HTTP::WebTest report plugins. |
9 |
|
|
10 |
|
=end original |
11 |
|
|
12 |
HTTP::WebTest::ReportPlugin - HTTP::WebTest レポート用のプラグインのサブクラス |
HTTP::WebTest::ReportPlugin - HTTP::WebTest レポート用のプラグインのサブクラス |
13 |
|
|
14 |
=head1 SYNOPSIS |
=head1 SYNOPSIS |
15 |
概要 |
|
16 |
|
=begin original |
17 |
|
|
18 |
Not applicable. |
Not applicable. |
19 |
|
|
20 |
|
=end original |
21 |
|
|
22 |
なし. |
なし. |
23 |
|
|
24 |
=head1 DESCRIPTION |
=head1 DESCRIPTION |
25 |
説明 |
|
26 |
|
=begin original |
27 |
|
|
28 |
This is a subclass of L<HTTP::WebTest|HTTP::WebTest::Plugin>. |
This is a subclass of L<HTTP::WebTest|HTTP::WebTest::Plugin>. |
29 |
L<HTTP::WebTest|HTTP::WebTest> report plugin classes can inherit from this |
L<HTTP::WebTest|HTTP::WebTest> report plugin classes can inherit from this |
30 |
class. It handles some test parameters common to report plugins by |
class. It handles some test parameters common to report plugins by |
31 |
providing implementation of the method C<print>. |
providing implementation of the method C<print>. |
32 |
|
|
33 |
|
=end original |
34 |
|
|
35 |
このクラスは L<HTTP::WebTest|HTTP::WebTest::Plugin> のサブクラスです. |
このクラスは L<HTTP::WebTest|HTTP::WebTest::Plugin> のサブクラスです. |
36 |
L<HTTP::WebTest|HTTP::WebTest> のレポートプラグインはこのクラスを |
L<HTTP::WebTest|HTTP::WebTest> のレポートプラグインはこのクラスを |
37 |
継承させます. ここではメソッド C<print> の実装を提供することで |
継承させます. ここではメソッド C<print> の実装を提供することで |
38 |
レポートプラグインに共通するいくつかのテストパラメータを処理しています. |
レポートプラグインに共通するいくつかのテストパラメータを処理しています. |
39 |
|
|
40 |
=head1 TEST PARAMETERS |
=head1 TEST PARAMETERS |
41 |
テストパラメータ |
|
42 |
|
(テストパラメータ) |
43 |
|
|
44 |
=head2 output_ref |
=head2 output_ref |
45 |
|
|
46 |
I<GLOBAL PARAMETER> |
I<GLOBAL PARAMETER> |
47 |
|
|
48 |
|
|
49 |
|
=begin original |
50 |
|
|
51 |
A reference to a scalar that accumulates text of test report. If this |
A reference to a scalar that accumulates text of test report. If this |
52 |
test parameter is specified then value of test parameter C<fh_out> is |
test parameter is specified then value of test parameter C<fh_out> is |
53 |
ignore. |
ignore. |
54 |
|
|
55 |
|
=end original |
56 |
|
|
57 |
テストレポートのテキストを蓄積させるためのスカラーへのリファレンスを |
テストレポートのテキストを蓄積させるためのスカラーへのリファレンスを |
58 |
指定します. このパラメータが指定されて多時は C<fh_out> テスト |
指定します. このパラメータが指定されて多時は C<fh_out> テスト |
59 |
パラメータの値は無視されます. |
パラメータの値は無視されます. |
60 |
|
|
61 |
|
=begin original |
62 |
|
|
63 |
This parameter can be used only when passing the test parameters |
This parameter can be used only when passing the test parameters |
64 |
as arguments from a calling Perl script. |
as arguments from a calling Perl script. |
65 |
|
|
66 |
|
=end original |
67 |
|
|
68 |
このパラメータは Perl スクリプトのテストパラメータ引数として |
このパラメータは Perl スクリプトのテストパラメータ引数として |
69 |
渡されたときのみ使われます. |
渡されたときのみ使われます. |
70 |
|
|
73 |
I<GLOBAL PARAMETER> |
I<GLOBAL PARAMETER> |
74 |
|
|
75 |
|
|
76 |
|
=begin original |
77 |
|
|
78 |
A filehandle (or anything else that supports C<print>) to use for test |
A filehandle (or anything else that supports C<print>) to use for test |
79 |
report output. This parameter is ignored if test parameter |
report output. This parameter is ignored if test parameter |
80 |
C<output_ref> is specified also. |
C<output_ref> is specified also. |
81 |
|
|
82 |
|
=end original |
83 |
|
|
84 |
テストレポートを出力するために使うファイルハンドル(もしくは |
テストレポートを出力するために使うファイルハンドル(もしくは |
85 |
C<print> をサポートする何か). このパラメータは |
C<print> をサポートする何か). このパラメータは |
86 |
テストパラメータ C<output_ref> が指定されているときには無視されます. |
テストパラメータ C<output_ref> が指定されているときには無視されます. |
87 |
|
|
88 |
|
=begin original |
89 |
|
|
90 |
This parameter can be used only when passing the test parameters |
This parameter can be used only when passing the test parameters |
91 |
as arguments from a calling Perl script. |
as arguments from a calling Perl script. |
92 |
|
|
93 |
|
=end original |
94 |
|
|
95 |
このパラメータは Perl スクリプトのテストパラメータ引数として |
このパラメータは Perl スクリプトのテストパラメータ引数として |
96 |
渡されたときのみ使われます. |
渡されたときのみ使われます. |
97 |
|
|
100 |
I<GLOBAL PARAMETER> |
I<GLOBAL PARAMETER> |
101 |
|
|
102 |
|
|
103 |
|
=begin original |
104 |
|
|
105 |
Option to e-mail output to one or more addresses specified by |
Option to e-mail output to one or more addresses specified by |
106 |
C<mail_addresses> test parameter. |
C<mail_addresses> test parameter. |
107 |
|
|
108 |
|
=end original |
109 |
|
|
110 |
C<mail_addresses> テストパラメータで指定されている1つまたはそれ以上の |
C<mail_addresses> テストパラメータで指定されている1つまたはそれ以上の |
111 |
アドレスに e-mail で出力を送るかの設定. |
アドレスに e-mail で出力を送るかの設定. |
112 |
|
|
115 |
I<GLOBAL PARAMETER> |
I<GLOBAL PARAMETER> |
116 |
|
|
117 |
|
|
118 |
|
=begin original |
119 |
|
|
120 |
Sets C<Subject> header for test report e-mails when all tests are |
Sets C<Subject> header for test report e-mails when all tests are |
121 |
passed successfully. In this string some character sequences have |
passed successfully. In this string some character sequences have |
122 |
special meaning (see C<mail_failure_subject> parameter for their |
special meaning (see C<mail_failure_subject> parameter for their |
123 |
description). |
description). |
124 |
|
|
125 |
|
=end original |
126 |
|
|
127 |
全てのテストが成功した時のテストレポートe-mailの C<Subject> ヘッダの |
全てのテストが成功した時のテストレポートe-mailの C<Subject> ヘッダの |
128 |
設定. この文字列には特別な意味を持つ文字並びがあります |
設定. この文字列には特別な意味を持つ文字並びがあります |
129 |
(C<mail_failure_subject> パラメータを参照してください). |
(C<mail_failure_subject> パラメータを参照してください). |
130 |
|
|
131 |
=head3 Default Value |
=head3 Default Value |
132 |
デフォルト値 |
|
133 |
|
(デフォルト値) |
134 |
|
|
135 |
C<Web tests succeeded> |
C<Web tests succeeded> |
136 |
|
|
140 |
I<GLOBAL PARAMETER> |
I<GLOBAL PARAMETER> |
141 |
|
|
142 |
|
|
143 |
|
=begin original |
144 |
|
|
145 |
Sets C<Subject> header for test report e-mails when some tests |
Sets C<Subject> header for test report e-mails when some tests |
146 |
fail. In this string some character sequences have special meaning: |
fail. In this string some character sequences have special meaning: |
147 |
|
|
148 |
|
=end original |
149 |
|
|
150 |
失敗したテストがあったときに e-mail テストレポートの C<Subject> |
失敗したテストがあったときに e-mail テストレポートの C<Subject> |
151 |
ヘッダを設定します. この文字列には特別な意味を持つ文字並びが |
ヘッダを設定します. この文字列には特別な意味を持つ文字並びが |
152 |
あります. |
あります. |
155 |
|
|
156 |
=item %f |
=item %f |
157 |
|
|
158 |
|
=begin original |
159 |
|
|
160 |
the number of failed tests |
the number of failed tests |
161 |
|
|
162 |
|
=end original |
163 |
|
|
164 |
失敗したテストの数 |
失敗したテストの数 |
165 |
|
|
166 |
=item %s |
=item %s |
167 |
|
|
168 |
|
=begin original |
169 |
|
|
170 |
the number of successful tests |
the number of successful tests |
171 |
|
|
172 |
|
=end original |
173 |
|
|
174 |
成功したテストの数 |
成功したテストの数 |
175 |
|
|
176 |
=item %t |
=item %t |
177 |
|
|
178 |
|
=begin original |
179 |
|
|
180 |
the total number of tests |
the total number of tests |
181 |
|
|
182 |
|
=end original |
183 |
|
|
184 |
テストの総数 |
テストの総数 |
185 |
|
|
186 |
=item %% |
=item %% |
187 |
|
|
188 |
|
=begin original |
189 |
|
|
190 |
replaced with single C<%> |
replaced with single C<%> |
191 |
|
|
192 |
|
=end original |
193 |
|
|
194 |
1つの C<%> に置換されます |
1つの C<%> に置換されます |
195 |
|
|
196 |
=back |
=back |
197 |
|
|
198 |
=head3 Default Value |
=head3 Default Value |
199 |
デフォルト値 |
|
200 |
|
(デフォルト値) |
201 |
|
|
202 |
C<WEB TESTS FAILED! FOUND %f ERROR(S)> |
C<WEB TESTS FAILED! FOUND %f ERROR(S)> |
203 |
|
|
207 |
I<GLOBAL PARAMETER> |
I<GLOBAL PARAMETER> |
208 |
|
|
209 |
|
|
210 |
|
=begin original |
211 |
|
|
212 |
A list of e-mail addresses where report will be send (if sending |
A list of e-mail addresses where report will be send (if sending |
213 |
report is enabled with C<mail> test parameter). |
report is enabled with C<mail> test parameter). |
214 |
|
|
215 |
|
=end original |
216 |
|
|
217 |
レポートを送る e-mail アドレスのリスト(C<mail> テストパラメータで |
レポートを送る e-mail アドレスのリスト(C<mail> テストパラメータで |
218 |
レポートの送信が有効にされているときだけ送られます). |
レポートの送信が有効にされているときだけ送られます). |
219 |
|
|
221 |
|
|
222 |
=item * all |
=item * all |
223 |
|
|
224 |
|
=begin original |
225 |
|
|
226 |
Send e-mail containing test results. |
Send e-mail containing test results. |
227 |
|
|
228 |
|
=end original |
229 |
|
|
230 |
テスト結果を含んだ e-mail を送ります. |
テスト結果を含んだ e-mail を送ります. |
231 |
|
|
232 |
=item * errors |
=item * errors |
233 |
|
|
234 |
|
=begin original |
235 |
|
|
236 |
Send e-mail only if one or more tests fails. |
Send e-mail only if one or more tests fails. |
237 |
|
|
238 |
|
=end original |
239 |
|
|
240 |
1つまたはそれ以上のテストが失敗したときにだけ e-mail を送ります. |
1つまたはそれ以上のテストが失敗したときにだけ e-mail を送ります. |
241 |
|
|
242 |
=item * no |
=item * no |
243 |
|
|
244 |
|
=begin original |
245 |
|
|
246 |
Do not send e-mail. |
Do not send e-mail. |
247 |
|
|
248 |
|
=end original |
249 |
|
|
250 |
e-mail を送信しません. |
e-mail を送信しません. |
251 |
|
|
252 |
=over 8 |
=over 8 |
266 |
I<GLOBAL PARAMETER> |
I<GLOBAL PARAMETER> |
267 |
|
|
268 |
|
|
269 |
|
=begin original |
270 |
|
|
271 |
Fully-qualified name of of the mail server (e.g., mailhost.mycompany.com). |
Fully-qualified name of of the mail server (e.g., mailhost.mycompany.com). |
272 |
|
|
273 |
|
=end original |
274 |
|
|
275 |
メールサーバの完全修飾ドメイン名(例えば mailhost.mycompany.com). |
メールサーバの完全修飾ドメイン名(例えば mailhost.mycompany.com). |
276 |
|
|
277 |
=head3 Default value |
=head3 Default value |
278 |
デフォルト値 |
|
279 |
|
(デフォルト値) |
280 |
|
|
281 |
C<localhost> |
C<localhost> |
282 |
|
|
286 |
I<GLOBAL PARAMETER> |
I<GLOBAL PARAMETER> |
287 |
|
|
288 |
|
|
289 |
|
=begin original |
290 |
|
|
291 |
Sets From: header for test report e-mails. |
Sets From: header for test report e-mails. |
292 |
|
|
293 |
|
=end original |
294 |
|
|
295 |
e-mail テストレポートの From: ヘッダを設定します. |
e-mail テストレポートの From: ヘッダを設定します. |
296 |
|
|
297 |
=head3 Default Value |
=head3 Default Value |
298 |
デフォルト値 |
|
299 |
|
(デフォルト値) |
300 |
|
|
301 |
|
=begin original |
302 |
|
|
303 |
Name of user under which test script runs. |
Name of user under which test script runs. |
304 |
|
|
305 |
|
=end original |
306 |
|
|
307 |
テストスクリプトを実行したユーザの名前. |
テストスクリプトを実行したユーザの名前. |
308 |
|
|
309 |
=head1 CLASS METHODS |
=head1 CLASS METHODS |
310 |
クラスメソッド |
|
311 |
|
(クラスメソッド) |
312 |
|
|
313 |
=head2 test_output () |
=head2 test_output () |
314 |
|
|
315 |
=head3 Returns |
=head3 Returns |
316 |
復帰値 |
|
317 |
|
(復帰値) |
318 |
|
|
319 |
|
=begin original |
320 |
|
|
321 |
Returns a reference to buffer that stores copy of test output. |
Returns a reference to buffer that stores copy of test output. |
322 |
|
|
323 |
|
=end original |
324 |
|
|
325 |
テスト出力のコピーを格納するバッファへのリファレンスを返します. |
テスト出力のコピーを格納するバッファへのリファレンスを返します. |
326 |
|
|
327 |
=head2 print (@array) |
=head2 print (@array) |
328 |
|
|
329 |
|
=begin original |
330 |
|
|
331 |
Prints data in <@array> either into string (if test parameter |
Prints data in <@array> either into string (if test parameter |
332 |
C<output_ref> is set) or to some filehandle (if test parameter C<fh_out> |
C<output_ref> is set) or to some filehandle (if test parameter C<fh_out> |
333 |
is set) or to standard output. |
is set) or to standard output. |
334 |
|
|
335 |
|
=end original |
336 |
|
|
337 |
<@array> の中のデータを文字列の中(テストパラメータ C<output_ref> が |
<@array> の中のデータを文字列の中(テストパラメータ C<output_ref> が |
338 |
設定されていたとき)もしくはファイルハンドル(テストパラメータ |
設定されていたとき)もしくはファイルハンドル(テストパラメータ |
339 |
C<fh_out> が設定されていたとき)もしくは標準出力に |
C<fh_out> が設定されていたとき)もしくは標準出力に |
340 |
出力します. |
出力します. |
|
>> |
|
341 |
|
|
342 |
|
|
343 |
|
=begin original |
344 |
|
|
345 |
Also stores this data into buffer accessible via method C<test_output>. |
Also stores this data into buffer accessible via method C<test_output>. |
346 |
|
|
347 |
|
=end original |
348 |
|
|
349 |
このデータは C<test_output> メソッドを通してバッファへの格納も |
このデータは C<test_output> メソッドを通してバッファへの格納も |
350 |
できます. |
できます. |
351 |
|
|
352 |
=head2 start_tests () |
=head2 start_tests () |
353 |
|
|
354 |
|
=begin original |
355 |
|
|
356 |
This method is called by L<HTTP::WebTest|HTTP::WebTest> at the beginning |
This method is called by L<HTTP::WebTest|HTTP::WebTest> at the beginning |
357 |
of the test run. Its implementation in this class initializes the |
of the test run. Its implementation in this class initializes the |
358 |
output buffer for the test report. |
output buffer for the test report. |
359 |
|
|
360 |
|
=end original |
361 |
|
|
362 |
このメソッドはテストの開始時に L<HTTP::WebTest|HTTP::WebTest> から |
このメソッドはテストの開始時に L<HTTP::WebTest|HTTP::WebTest> から |
363 |
呼び出されます. このクラスの実装ではテストレポート用の出力バッファを |
呼び出されます. このクラスの実装ではテストレポート用の出力バッファを |
364 |
初期化します. |
初期化します. |
365 |
|
|
366 |
|
=begin original |
367 |
|
|
368 |
If you redefine this method in a subclass, be sure to call |
If you redefine this method in a subclass, be sure to call |
369 |
the superclass method in the new method: |
the superclass method in the new method: |
370 |
|
|
371 |
|
=end original |
372 |
|
|
373 |
もしサブクラスでこのメソッドを再定義するのなら, |
もしサブクラスでこのメソッドを再定義するのなら, |
374 |
新しいメソッドの中でスーパークラスのメソッドを呼び出してください: |
新しいメソッドの中でスーパークラスのメソッドを呼び出してください: |
375 |
|
|
384 |
|
|
385 |
=head2 end_tests () |
=head2 end_tests () |
386 |
|
|
387 |
|
=begin original |
388 |
|
|
389 |
This method is called by L<HTTP::WebTest|HTTP::WebTest> at the end of |
This method is called by L<HTTP::WebTest|HTTP::WebTest> at the end of |
390 |
a test run. Its implementation in this class e-mails the test report |
a test run. Its implementation in this class e-mails the test report |
391 |
according test parameters C<mail***>. |
according test parameters C<mail***>. |
392 |
|
|
393 |
|
=end original |
394 |
|
|
395 |
このメソッドはテストの終了時に L<HTTP::WebTest|HTTP::WebTest> から |
このメソッドはテストの終了時に L<HTTP::WebTest|HTTP::WebTest> から |
396 |
呼び出されます. このクラスの実装ではテストパラメータ C<mail***> |
呼び出されます. このクラスの実装ではテストパラメータ C<mail***> |
397 |
に従ってテストレポートを e-mail で送信します. |
に従ってテストレポートを e-mail で送信します. |
398 |
|
|
399 |
|
=begin original |
400 |
|
|
401 |
If you redefine this method in subclass be sure to call |
If you redefine this method in subclass be sure to call |
402 |
the superclass method in the new method: |
the superclass method in the new method: |
403 |
|
|
404 |
|
=end original |
405 |
|
|
406 |
もしサブクラスでこのメソッドを再定義するのなら, |
もしサブクラスでこのメソッドを再定義するのなら, |
407 |
新しいメソッドの中でスーパークラスのメソッドを呼び出してください: |
新しいメソッドの中でスーパークラスのメソッドを呼び出してください: |
408 |
|
|
416 |
} |
} |
417 |
|
|
418 |
=head1 COPYRIGHT |
=head1 COPYRIGHT |
|
著作権 |
|
419 |
|
|
420 |
Copyright (c) 2001-2003 Ilya Martynov. All rights reserved. |
Copyright (c) 2001-2003 Ilya Martynov. All rights reserved. |
421 |
|
|
422 |
|
|
423 |
|
=begin original |
424 |
|
|
425 |
This program is free software; you can redistribute it and/or modify |
This program is free software; you can redistribute it and/or modify |
426 |
it under the same terms as Perl itself. |
it under the same terms as Perl itself. |
427 |
|
|
428 |
|
=end original |
429 |
|
|
430 |
このプログラムはフリーソフトウェアです. |
このプログラムはフリーソフトウェアです. |
431 |
このプログラムは Perl 自身と同じ条件下で再配布・改変可能です. |
このプログラムは Perl 自身と同じ条件下で再配布・改変可能です. |
432 |
|
|
433 |
=head1 SEE ALSO |
=head1 SEE ALSO |
|
関連項目 |
|
434 |
|
|
435 |
L<HTTP::WebTest|HTTP::WebTest> |
L<HTTP::WebTest|HTTP::WebTest> |
436 |
|
|