このセクションの内容:
Selenic によって分析されたテスト結果を Parasoft DTP に送信し、データの集約、処理、可視化を行うことができます。DTP は、収集したデータに開発とテストに関する高度な分析を適用します。そして、開発マネジャーとプロジェクトメンバーがソフトウェアの状態を評価する事を可能にします。DTP に送信されたデータを表示する方法については、DTP で結果を表示 を参照してください。
コマンドラインで selenic_analyzer.jar を実行して、テスト結果を DTP に送信します(コマンドライン を参照)。
DTP にデータを送信するには、selenic.properties ファイル(ライセンス を参照)で DTP への接続を設定する必要があります。DTP で提供するネットワークライセンスを使用する場合、Selenic はライセンスを取得するために接続する DTP と同じインスタンスにテスト結果を送信します。DTP で提供するネットワークライセンスを使用したくない場合は、ローカルライセンスを設定して Selenic 機能を有効にできますが、テスト結果を送信するように DTP への接続を設定する必要があります。
DTP への接続設定に加えて、データを受信する DTP のプロジェクトを指定する必要もあります。Selenic インストールディレクトリにある selenic.properties ファイルを開き、DTP SERVER SETTINGS セクションでプロジェクト名を指定します:
# Specifies host name of the DTP server. dtp.server=<host where DTP is running> # Specifies port number of the DTP server. # Commonly used values are 443 and 8443. dtp.port=<port where DTP is running> # Specifies user name for DTP server authentication. dtp.user=<user name to log into DTP> # Specifies password for DTP server authentication - use java -jar selenic_analyzer.jar -encodepass <PASSWORD> to encode the password, if needed. dtp.password=<password to log into DTP> # Specifies name of the DTP project (optional). dtp.project=<name of your project on DTP> |
REPORTING セクションの report.dtp.publish
プロパティを true
設定します:
# === REPORTING === # Enables reporting test results to DTP server - be sure to configure DTP server settings. report.dtp.publish=true |
report.dtp.publish
オプションが有効になっている場合、Selenic はデフォルトでテストコードのソースファイルのコピーも DTP に公開します。この動作を変更するための詳細については、DTP へのソースファイルの公開 をご覧ください。
report.dtp.publish
オプションが有効になっている場合、Selenic はデフォルトで JUnit または TestNG ソースファイルのコピーを公開します。ソースを DTP に公開すると、テストエクスプローラービューでテストの詳細と関連するソースを表示できます。テストエクスプローラービューの使用に関する詳細については、DTP のドキュメントを参照してください。
テストファイルがソース管理に保存されている場合、ソース管理を DTP と共有するように Selenic を設定することで、DTP でソースを表示できるようにする事もできます。 詳しくは、ソース管理の設定 をご覧ください。
ソースを DTP に公開する方法を制御するには、REPORTING セクションの report.dtp.publish.src
の設定で公開モードを指定します:
# === REPORTING === # Enables reporting test results to DTP server - be sure to configure DTP server settings. report.dtp.publish=true # Specifies whether the tested source code is published to the DTP server. Options are "full", "min", and "off" report.dtp.publish.src=full |
以下のモードを指定できます:
full | 指定したスコープのすべてのソースコードを DTP に公開します。これは、 |
---|---|
min | 最小限のソースコードを公開します。殆どの場合、自動生成されたコードやソース管理への参照がないその他のソースコードが公開されます。 |
off | ソースコードを DTP に公開しません。 |
デフォルトでは、Selenic は現在のディレクトリでソースファイルをチェックします。ソースファイルが別のディレクトリに保存されている場合は、selenic_analyzer.jar ファイルの実行時に -source
オプションを使用して、ソースの場所を指定します。使用方法の詳細については、コマンドライン をご覧ください。
各テスト実行はビルド ID に関連付けられています。ビルド ID は、一連のテスト実行をグループ化するために使用されるユニークな識別子です。ビルド ID の詳細については、DTP のドキュメントを参照してください。デフォルトでは、プロジェクト名と実行日付がビルド ID として使用されますが、build.id
プロパティのコメントを外して、任意の値を指定できます:
# === REPORTING === # Enables reporting test results to DTP server - be sure to configure DTP server settings. report.dtp.publish=true # Specifies whether the tested source code is published to the DTP server. Options are "full", "min", and "off" # report.dtp.publish.src=full # Specifies a build identifier used to label results. It may be unique for each build # but may also label more than one test sessions that were executed during a specified build. build.id=<your custom build ID> |
session.tag
プロパティのコメントを外して値を指定することで、実行環境やテスト済みのモジュールなどを区別できます:
# === REPORTING === # Enables reporting test results to DTP server - be sure to configure DTP server settings. report.dtp.publish=true # Specifies a build identifier used to label results. It may be unique for each build # but may also label more than one test sessions that were executed during a specified build. build.id=<your custom build ID> # Specifies a tag which represents an unique identifier for the run, used to distinguish it from similar runs. # It could be constructed as minimal combination of following variables that will make it unique or specified manually. # e.g. ${dtp_project}-${exec_env} session.tag=<your custom session tag> |
デフォルトでは、DTP のプロジェクト名と実行環境(オペレーティングシステムとアーキテクチャ)が使用されます。
セッションタグとセッション ID を混同しないでください。セッションタグは、DTP レポートインターフェイスでデータをセグメント化するために使用される識別子ですが、セッション ID は、Selenic アナライザーがSelenic エージェントで収集したテスト実行データを区別するために使用されます。 |
コマンドラインで -publish
フラグを使用して、selenic_analyzer.jar ファイルの実行ごとに結果を DTP に公開するように Selenic を設定することもできます(コマンドライン を参照)。その場合は、DTP への接続設定と selenic.properties ファイルの dtp.project
プロパティを設定する必要があります。