blog20100901

2013/08/20 - プログラミング言語 Perl にまつわる etc. - Perl monger
参考 : perldoc, perldoc.jp, search.cpan.org, perldoc.perl.org ...
「 初めての Perl 第 6 版 」(オライリー・ジャパン発行 ISBN978-4-87311-567-2) 」
「 続・初めての Perl 改訂版 」(オライリー・ジャパン発行 ISBN4-87311-305-9) 」
「 Effective Perl 第 2 版 」(翔泳社発行 ISBN978-4-7981-3981-4) 」 ... etc,.

Perl Perl_6 翻訳 CPAN Testers

Perl CPAN Testers, Quick Start for CPAN Testers (d113)

Perl CPAN Testers, Quick Start for CPAN Testers (d113)

目次 - Perl Index


この記事の内容をより読みやすい日本語で 再確認 しました。




Theme



Perl について、復習を兼ねて断片的な情報を掲載して行く連載その d113 回。

Perl で、独自のディストリビューション ( distribution ) を作成する際に、できれば理解しておいた方がよいだろう CPAN Testers について確認します。

今回は、CPAN Testers Wiki より Quick Start for CPAN Testers を自家用に翻訳します。正確な情報はリンク先の原文を参照してください。

Quick Start for CPAN Testers ( クイックスタート CPAN Testers のための )
Installing Test Reporting Tools (インストールする Test Reporting Tools を )
Creating a Profile ( 作成する Profile を )
Configuring Test Reporting Tools ( 構成する Test Reporting Tools を )
Try it out! ( やってみて ! )
What Next? ( 次は何 ? )
Automated Testing ( 自動化したテスト )
Further Information ( さらなる情報 )



Quick Start for CPAN Testers ( クイックスタート CPAN Testers のための )



There are three steps to start using CPAN Testers:


3 つのステップがあります 使い始めるために CPAN Testers を:

・Installing test reporting tools
・Creating a CT 2.0 profile
・Enabling reporting in CPAN clients


・ インストールする test reporting ツールを
・ 作成する CT 2.0 profile を
・ リポートを有効にする CPAN クライアントで

Even if you don't plan to run automated "smoke" tests, but just want to send reports when you happen to install modules from CPAN, you must complete all three steps.


たとえあなたに 実行する予定がなく 自動化 "smoke" テストを, しかし 送信は望むとしても リポートを あなたがモジュールをインストールすることになったとき CPAN から, あなたは完了しなければなりません 3 ステップすべてを

If you plan to do automated smoke testing, these steps will ensure that you can send reports to the CPAN Testers server and you will need to look at other articles on this wiki for information on configuring automated testing. See the "What Next" section at the bottom of this document for more.

もしあなたが予定しているなら 自動化 smoke testing をすることを, これらのステップは確認します あなたがリポートを送信できることを CPAN Testers サーバに それと あなたは参照する必要があります この wiki の記事を 情報のために 自動化テストの構成での. 参照します "What Next" セクションを このドキュメントの下にある 詳細のために.


Installing Test Reporting Tools (インストールする Test Reporting Tools を )



Each CPAN client use a different tool for sending reports.


各 CPAN クライアントは使います 異なるツールを リポートをの送信のために.

・CPAN.pm (the 'cpan' command) uses CPAN Reporter;
・CPANPLUS uses its own;
・CPANMINUS (the 'cpanm' command) may be accompanied by cpanm-reporter


CPAN.pm ( 'cpan' コマンド ) は CPAN Reporter を使う;
CPANPLUS は独自のものを使う;
CPANMINUS ( 'cpanm' コマンド ) は多分伴う cpanm-reporter

If you have not yet installed CPANPLUS or are a first-time tester or don't plan to run an automated smoke testing machine, start with CPAN::Reporter. Or, if you do plan to run an automated smoke testing machine, then we recommend you start with CPANPLUS.


もし あなたがまだ CPANPLUS をインストールしていないか または 初めてのテスターか または 予定がないなら 自動化 smoke testing マシンの実行の, CPAN::Reporter で始めます. または, もしあなたが予定しているなら 自動化 smoke testing マシンを, それなら 私たちは推奨します あなたが始めることを CPANPLUS で.

Depending on which tool you choose, you will need to install or upgrade the following distributions to the versions listed below:


ツールに応じて あなたが選択した, あなたは必要です インストールまたはアップグレードが 次のディストリビューションの 以下にリストしたバージョンに:


Using CPAN::Reporter



・Task::CPAN::Reporter 0.001

The task will attempt to install Crypt::SSLeay. If that fails, try IO::Socket::SSL instead.


Task::CPAN::Reporter 0.001

The task will attempt to install Crypt::SSLeay. If that fails, try IO::Socket::SSL instead.


task は試みます インストールを Crypt::SSLeay を. もしそれが失敗するなら, トライします IO::Socket::SSL を 代わりに.


Using CPANPLUS



・Task::CPANPLUS::Metabase
・Crypt::SSLeay (or IO::Socket::SSL if Crypt::SSLeay fails to install)


Task::CPANPLUS::Metabase
Crypt::SSLeay ( または IO::Socket::SSL もし Crypt::SSLeay がインストールに失敗したら )


Using cpanm-reporter



・App::cpanminus::reporter (which depends on necessary metabase modules).


App::cpanminus::reporter ( それは依存します 必要なメタベースモジュールに ).


Creating a Profile ( 作成する Profile を )



If you were not already sent a CT 2.0 profile file, then you need to create a new profile.


もしあなたがまだ送信していない場合 CT 2.0 profile ファイルを, それなら あなたは必要です 作成が 新しい profile の.


Using CPAN::Reporter



If you plan to use CPAN::Reporter, create your profile with the 'metabase-profile' tool.


もしあなたが予定するなら CPAN::Reporter の利用を, 作成します あなたの profile を 'metabase-profile' ツールで.


$ metabase-profile



Answer the prompts and copy or move the resulting metabase_id.json file to a ".cpantesters" directory under your home directory. The JSON file can actually be placed anywhere, just change the "id_file" parameter of the "transport" key in the configuration file; see below for details.


答えます プロンプトに それと コピーまたは移動します 結果の metabase_id.json ファイルを ".cpantesters" ディレクトリに あなたのホームディレクトリの下の. JSON ファイルは実際には置けます どこにでも, 変更するだけです "id_file" パラメータを "transport" キーの 構成ファイルの; 参照します 以下の詳細を.


$ mkdir ~/.cpantesters
$ cp metabase_id.json ~/.cpantesters/
$ chmod 400 ~/.cpantesters/metabase_id.json



If you want to send test reports from multiple accounts or computers, just copy the profile file to a similar directory on each one. You should use the same profile for all reports that you send.


もしあなたがテストリポートの送信を望むなら 複数のアカウントまたはコンピュータから, ただコピーします profile ファイルを 同じディレクトリに それぞれの. あなたは使うべきです 同じ profile を すべてのリポートで あなたが送信する.

You have to put the metabase_id.json file in a path that does not have space or other special characters in it. On Windows c:\metabase_id.json is a good choice.


あなたは置く必要があります metabase_id.json ファイルを パスに スペースや他の特殊文字を持っていない. Windows での c:\metabase_json は良い選択です.


Using CPANPLUS



If you installed Task::CPANPLUS::Metabase, it comes with a helper script that will prompt you for information, generate your profile file, save it to a directory, and configure CPANPLUS as well:


もしあなたがインストールしているなら Task::CPANPLUS::Metabase を, それは付属しています ヘルパースクリプトが あなたに情報を促す, 生成する あなたの profile ファイルを, それを保存する ディレクトリに, それと 構成する CPANPLUS も:


$ metabase_cpanp



Your profile will be saved to the ~/.metabase directory (or to %APPDATA%\metabase on Windows).


あなたの profile は保存されます ~/.metabase ディレクトリに ( または %APPDATA%\metabase に Windows で).

If you did not install Task::CPANPLUS::Metabase or if you want to create your profile without configuring CPANPLUS automatically, follow the instructions above for generating a profile with CPAN::Reporter. You can save the profile to any directory you want, but note the location so you can configure things later.


もしあなたがインストールしていないなら Task::CPANPLUS::Metabase を または もしあなたが望むなら あなたの profile の作成を 自動的に CPANPLUS を構成することを除外して, 従います 上記の指示に profile を作成するための CPAN::Reporter で. あなたは保存できます profile を 任意のディレクトリに あなたが望む, しかし控えておきます 場所を あなたがそれを構成できるように 後で.


Using CPANMINUS



Run the following script and answer questions. Note that it creates the same metabase_id.json as tools mentioned above.


実行します 次のスクリプトを それと 質問に答えます. 注意してください それは作成します 同じ metabase_id.json を 上記で述べたツールと.


$ cpanm-reporter --setup




Configuring Test Reporting Tools ( 構成する Test Reporting Tools を )



The configuration depends on which tools you are using. You will need to hand-edit certain configuration files. Eventually, we hope to automate the configuration process more completely.


構成は あなたが使っているツールによります. あなたは手動で編集する必要があるでしょう 特定の構成ファイルを. やがては, 私たちは望んでいます 自動的な構成プロセスを より完全に.


Using CPAN::Reporter



If you have never used CPAN::Reporter before you have to configure/reconfigure CPAN to enable CPAN::Reporter usage (see the CPAN::Reporter documentation for the latest information).


もしあなたが使ったことがないなら CPAN::Reporter を あなたが CPAN を構成/再構成しなければならない前に 有効化するために CPAN::Reporter の使用を ( 参照します CPAN::Reporter のドキュメントを 最新の情報のために ).


$ cpan
cpan> o conf init test_report
cpan> o conf commit
cpan> force test CPAN::Reporter
cpan> q



Check that 'cpan' created a file called ~/.cpanreporter/config.ini containing at least the following lines (but with your real email address):


チェックします 'cpan' がファイルを作成したことを ~/.cpanreporter/config.ini と呼ばれる 含みます 少なくとも次の行を ( しかしあなたの本当の email アドレスで ):


email_from = youremail@example.com
transport = Metabase uri https://metabase.cpantesters.org/v1/ id_file ~/.cpantesters/metabase_id.json



The "email_from" line is redundant but required. Eventually, CPAN::Reporter will no longer need it.


"email_fome" 行は冗長です しかし必須です. やがて, CPAN::Reporter はもはやそれを必要としなくなります.

If both IO::Socket::SSL and Crypt::SSLeay fail to install, you can use HTTP instead of HTTPS. However, that is not recommended, so please try your best to install either IO::Socket::SSL or Crypt::SSLeay. In modern versions of LWP you will also need to install LWP::Protocol::https


もし IO::Socket::SSL と Crypt::SSLeay の両方がインストールに失敗するなら, あなたは使えます HTTP を HTTPS の代わりに. しかしながら, それは推奨されません, なのであなたの最善を尽くしてください いずれかのインストールに IO::Socket::SSL か Crypt::SSLeay の. モダンなバージョンでは LWP の あなたはまたインストールが必要です LWP::Protocol::https の

Remember to update the config.ini to include the path to metabase_id.json If you followed the suggestion and on Windows you put the file in c:\ then here put


忘れないでください アップデートを config.ini の 含めるために パスを metabase_id.json への もしあなたが従っていて 提案に それと Windows なら あなたは ファイルを置きます c:\ に それから ここに置きます


transport = Metabase uri https://metabase.cpantesters.org/api/v1/ id_file c:/metabase_id.json




Using CPANPLUS



If you used the 'metabase_cpanp' script to generate your profile, then it already configured CPANPLUS for you and you're done.


もしあなたが使ったなら 'metabase_cpanp' スクリプトを あなたの profile の生成に, それなら すでに CPANPLUS が構成されています あなたのために それと あなたは完了しています.

If you did not use 'metabase_cpanp', then you need to make the following changes to your CPANPLUS configuration.


もしあなたが使っていないなら 'metabase_cpanp' を, それならあなたは必要です 次のように変更することが あなたの CPANPLUS の構成のために.

In "~/.cpanplus/lib/CPANPLUS/Config/User.pm" add the following lines:


"~/.cpanplus/lib/CPANPLUS/Config/User.pm" で追加します 次の行を:


cpantest_reporter_args => {
transport => 'Metabase',
transport_args => [
uri => "https://metabase.cpantesters.org/api/v1/",
id_file => "~/.cpantesters/metabase_id.json"
],
}



Be sure to set the 'id_file' parameter to the location of your profile file.


確実にセットします 'id_file' パラメータを あなたの profile ファイルの場所に.

Then, you need to enable CPAN Testers reporting from within CPANPLUS:


それから, あなたは有効化する必要があります CPAN Testers reporting を CPANPLUS 内から:


$ cpanp
CPAN Terminal> s conf cpantest 1
CPAN Terminal> s save




Using CPANMINUS



Reporting is not fully integrated with cpanm, and you have to run cpanm-reporter separately after installing distributions. For example:


Reporting は完全に統合されていません cpanm と, それと あなたは実行する必要があります cpanm-reporter を 別に ディストーションのインストールの後で. 例えば:


$ cpanm --sudo Acme::Dice Acme::Tiny
$ cpanm-reporter



By default, cpanm-reporter reports results of last cpanm install, check it's options for more possibilities.


デフォルトでは, cpanm-reporter はリポートします 最後の cpanm のインストールの結果を, チェックします オプションを より多くの可能性のために.


Try it out! ( やってみて ! )



Using either CPAN (with CPAN::Reporter) or CPANPLUS, try testing a module on CPAN. You should see messages on screen after tests are run that show that the report has been sent.


どちらかを使って CPAN ( CPAN::Reporter と ) または CPANPLUS の, テストをトライします CPAN のモジュールを. あなたはメッセージを見るはずです 画面で テストを実行した後に 示す リポートが送信されたことを.

After a while, your report will show up in the CT 2.0 log tail. (This tail file is refreshed every 5 minutes or so.) Eventually, your report will make it to the main CPAN Testers web site.


しばらく後で, あなたのリポートは表示されます CT 2.0 log tail に. (この tail file はリフレッシュされます 5 分ごとくらいで.) そのうちに, あなたのリポートは到達します メインの CPAN Testers web サイトに.

If you don't see your report in the log tail after 10 minutes, please email cpan-testers-discuss@perl.org or inquire in #cpantesters-discuss on irc.perl.org for assistance.


もしあなたが見れないなら あなたのリポートが log tail で 10 分後の, email してください cpan-testers-discuss@perl.org に または問い合わせてください #cpantesters-discuss で irc.perl.org の 支援のために.


What Next? ( 次は何 ? )



If you followed the steps above and have successfully sent reports to the new CPAN Testers 2.0 server, you may wish to explore automated testing or other advanced configuration.


もしあなたが従って 上記ステップに それと 成功したなら リポートの送信が 新しい CPAN Testers 2.0 サーバに, あなたは調べたくなるかもしれません 自動化テストや他の高度な構成を.


Automated Testing ( 自動化したテスト )



Sending test reports for the modules you personally install, helps you directly by giving valuable information to the authors to help them improve quality and portability of the modules you currently use.


送信すると テストリポートを モジュールのための あなたが個人的にインストールする, 役立ちます あなたは直接的に 与えることで 貴重な情報を 著者に 助ける それらの品質向上を それと 移植性を モジュールの あなたが現在使用する.

Taking the next step to automated testing helps many more people by testing many more modules on your system, including modules you are likely to install in the future.


ネクストステップを取ると 自動化テストに 役立ちます より多くの人々に テストすることによって より多くのモジュールを あなたのシステムで, モジュールを含めて あなたがインストールするかもしれない 今後.

If you plan to automate your testing, you will want to investigate either CPAN-Reporter-Smoker if you're using CPAN::Reporter, or CPANPLUS-YACSmoke if you're using CPANPLUS. See the SmokeTools page for more instructions for automated smoking.


もしあなたが自動化することを予定しているなら あなたのテストを, あなたは調べたくなるでしょう どちらかを CPAN-Reporter-Somoker もしあなたが使っているなら CPAN::Reporter を, または CPANPLUS-YACSmoke もしあなたが使っているなら CPANPLUS を. 参照します Somoke Tools ページを 詳しい説明のために automated smoking の.


Advanced configurations (高度な構成)



If you are planning to send reports from several different machines or environments, or need to conduct tests offline, then you may wish to investigate using Metabase-Relayd or Bingos's blog.


もしあなたが計画している リポートの送信を いくつかの異なるマシンまたは環境からの, または行う必要があるなら オフラインでのテストを, それならあなたは調べたいかもしれません Metabase-Relayd または Bingos's blog を使って.


Further Information ( さらなる情報 )



For more detailed setup instructions see CPANReporterSmokerLong


より詳細なセットアップ案内は 参照します CPANReporterSmokerLong


NEXT



次回は、同じ CPAN Testers Wiki から Information for CPAN module authors の「 How do I contact the person that sent a test report? 」を確認します。


参考情報は書籍「 続・初めての Perl 改訂版 」, 「 Effective Perl 第 2 版 」を中心に perldoc, Wikipedia および各 Web サイト。それと詳しい先輩。

目次 - Perl Index






















同じカテゴリー(Perl)の記事
 Perl mp2 翻訳 Web コンテンツ圧縮の FAQ (d228) (2023-10-11 23:49)
 Perl mp2 翻訳 既知のブラウザのバグの回避策をいくつか (d227) (2023-05-26 15:41)
 Perl mp2 翻訳 Perl と Apache でのキュートなトリック (d226) (2023-05-19 17:05)
 Perl mp2 翻訳 テンプレートシステムの選択 (d225) (2022-08-15 22:23)
 Perl mp2 翻訳 大規模 E コマースサイトの構築 (d224) (2022-06-15 20:43)
 Perl mp2 翻訳 チュートリアル (d223) (2022-06-15 20:42)
上の画像に書かれている文字を入力して下さい
 
<ご注意>
書き込まれた内容は公開され、ブログの持ち主だけが削除できます。

Llama
リャマ
TI-DA
てぃーだブログ
プロフィール
セラ (perlackline)
セラ (perlackline)
QRコード
QRCODE
オーナーへメッセージ

PAGE TOP ▲