Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SVC2023.2

In this sectionこのセクションの内容:

Table of Contents
maxLevel1

...

はじめに

The Parasoft Continuous Testing Extension for Azure DevOps enables you configure various actions needed for automated, continuous testing across your software delivery pipeline. You can configure build steps for:

  • Provisioning environments into the specific states needed for automated testing
  • Replicating environments and associated assets to different Virtualize servers
  • Executing Parasoft test scenario jobs (tests suites that execute vs. specific environment configurations)
  • Destroying "dirtied" test environments to ensure that subsequent tests always begin with a clean slate
  • Disconnecting a Virtualize server from CTP to remove unnecessary connections
  • Publishing test execution results to Parasoft DTP

Requirements

  • CTP 2020.1 or higher must be hosted at a publicly available IP address.   
  • DTP 2020.1 or higher for publishing test execution XML report and test environment information to DTP; must be hosted at a publicly available IP address.     

Installation

  1. Log into Azure DevOps and choose Browse marketplace from the marketplace menu.
    Image Removed
  2. Search for Parasoft Continuous Testing and click on the tile in the search results.
  3. Click Get it free on the extension details page. 
  4. Click Install when prompted.
    Image Removed

Functionality enabled by the extension will be available when you configure release pipelines. See Configuration for details.

Configuration Service Connections

を使用すると、ソフトウェア デリバリ パイプライン全体で自動化された継続的なテストに必要なさまざまなアクションを構成できます。以下を行うビルド ステップを設定できます。

  • 自動テストに必要な特定の状態に環境をセットアップする
  • 環境および関連するアセットを別の Virtualize サーバーに複製する
  • Parasoft テスト シナリオ ジョブ (特定の環境設定で実行されるテスト スイート) を実行する
  • 後続のテストが常にクリーンな状態から開始できるよう、「汚れた」テスト環境を破壊する
  • Virtualize サーバーを CTP から切断して、不要な接続を削除する
  • テストの実行結果を Parasoft DTP にパブリッシュする

要件

  • CTP 2020.1 以降は、公開されている IP アドレスでホストされる必要があります。   
  • テスト実行 XML レポートとテスト環境情報を DTP にパブリッシュするには、DTP 2020.1 以降が必要です。パブリックに利用可能な IP アドレスでホストされている必要があります。     

インストール

  1. Azure DevOps にログインし、マーケットプレイス メニューから [Browse marketplace] を選択します。
    Image Added
  2. Parasoft Continuous Testing を検索し、検索結果のタイルをクリックします。
  3. 拡張機能の詳細ページで [Get it free] をクリックします。 
  4. [Install] をクリックします。
    Image Added

拡張機能によって有効になる機能は、リリース パイプラインを設定するときに利用できるようになります。詳細については「Configuration」を参照してください。

サービス接続の設定

Azure DevOps プロジェクトに接続する Parasoft CTP および DTP のインスタンスは、パブリック IP アドレスで利用できる必要があります。Azure VM への CTP のデプロイの詳細については、「The instances of Parasoft CTP and DTP connected to your Azure DevOps project must be available at a public IP address. Refer to the Deploying Virtualize to Cloud-based Microsoft Environments guide for details about deploying CTP to an Azure VM. Refer to the DTP documentation for information about deploying DTP to cloud-based services. When CTP and/or DTP are available, you can configure a service connection for your project.」を参照してください。 クラウドベースのサービスへの DTP のデプロイについては、DTP ドキュメントを参照してください。CTP および/または DTP が利用可能になったら、プロジェクトのサービス接続を設定できます。

  1. プロジェクトを開き、[Pipelines] > [Service connections] に移動します。
  2. [Create service connection] をクリックし、[Parasoft CTP] を有効にします。
    Image Added
  3. [Next] をクリックし、CTP サーバーへの接続設定を指定します。

  4. Open your project and choose Pipelines > Service connections.
  5. Click Create service connection and enable Parasoft CTP.
    Image Removed
  6. Click Next and specify the connection settings to the CTP server.
    Example:

    Code Block
    languagetext
    http://{host}:{port}/em
  7. Specify a service connection name and click Save.
  8. サービス接続名を指定して、[Save] をクリックします。
  9. 結果を DTP にレポートする場合は、Parasoft DTP に対してこのプロセスを繰り返します。
    例:Repeat the process for Parasoft DTP if you intend to report results to DTP. 
    Example:

    Code Block
    languagetext
    http://{host}:{port}/grs

You will be able to use the service connection endpoints in your pipeline tasks.

Configuring Tasks

パイプライン タスクでサービス接続エンドポイントを使用できるようになります。

タスクの設定

拡張機能には、リリース パイプラインに追加できる次のタスクが含まれています。The extension includes the following tasks that you can add to your release pipeline:

Scroll Table Layout
widths30%,70%

Parasoft Service Virtualization Deploy
Provisions environments into the specific states needed for testing and optionally replicates environments and associated assets to different Virtualize servers (including servers dynamically-provisioned from Docker or other container technologies).
テストに必要な状態に環境をセットアップし、オプションとして環境および関連アセットを別の Virtualize サーバー (Docker などのコンテナー技術によって動的にセットアップされたサーバーを含む) にレプリケートします。
Parasoft Execute Job
Executes one of the test scenario jobs (tests suites that execute vs. specific environment configurations) available on the connected instance of Environment Manager. 
テスト シナリオ ジョブ (特定の環境設定で実行されるテスト スイート) を実行します。 
Parasoft Service Virtualization Destroy
Deletes "dirtied" test environments to ensure that subsequent tests always begin with a "clean" test environment.
後続のテストが常にクリーンな環境から開始できるよう、「汚れた」テスト環境を削除します。

Parasoft Service Virtualization Disconnect

De-registers a specified Virtualize server from
Environment Manager
.

Adding Tasks

You can add and configure tasks in a release pipeline job:

から指定された Virtualize サーバーの登録を削除します。

タスクの追加

リリース パイプライン ジョブでタスクを追加および構成できます。

  1. プロジェクトを開き、サイドバー メニューから [Pipelines] を選択します。 
  2. 既存のパイプラインをクリックして [Edit] をクリックするか、新しいパイプラインを作成します。
    Image Added
  3. 新しいステージを追加するか、既存のステージをクリックします。 
  4. ステージにタスクを追加し、Parasoft タスクを選択します。
    Image Added
  5. それに応じてタスクを構成します。詳細については以下のセクションを参照してください。
  6. Open your project choose Pipelines from the sidebar menu. 
  7. Click on an existing pipeline and click Edit or create a new pipeline.
    Image Removed
  8. Add a new stage or click on an existing stage. 
  9. Add a task to the stage and choose a Parasoft task.
    Image Removed
  10. Configure the task(s) accordingly. Refer to the following sections for details:

...

Deploy Environment

...

This task provisions environments into the specific states needed for testing. As an additional option, it can also replicate environments and associated assets to different Virtualize servers (including servers dynamically-provisioned from Docker or other container technologies). 

Image Removed

タスクの設定

このタスクは、テストに必要な特定の状態に環境をセットアップします。オプションとして、環境および関連するアセットを別の Virtualize サーバー (Docker などのコンテナー技術によって動的にセットアップされたサーバーを含む) にレプリケートできます。 

Image Added

以下のフィールドは必須です。The following fields are required:

Scroll Table Layout
widths30%,70%

Display name
Specifies the name for the task.
タスクの名前を指定します。
Parasoft CTP Endpoint
Specifies the CTP to use for the task. Choose an endpoint from the drop-down menu. See 
タスクに使用する CTP を指定します。「Configuring Service Connections
.
」を参照してください。
System
Specifies the system in CTP that contains the environment instance you want to provision. Choose a system from the drop-down menu. 
セットアップする環境インスタンスを含む CTP 内のシステムを指定します。
Environment
Specifies the environment in the CTP system that contains the instance you want to provision. Choose an environment from the drop-down menu.InstanceSpecifies the environment instance to provision. Choose an instance from the drop-down menu.

Enable the Copy the environment assets option to replicate the environment and associated assets (virtual assets, proxies, JDBC controllers, etc.) to a new Virtualize server before provisioning. Specify the name of the Virtualize server and the name of the environment where the assets will be copied. The environment will be destroyed later in the release pipeline process.

Image Removed

Enable the Duplicate data repositories option to duplicate the associated data repositories before provisioning.

Image Removed

セットアップするインスタンスを含む CTP システム内の環境を指定します。
Instanceセットアップする環境インスタンスを指定します。

[Copy the environment assets] を有効にすると、セットアップ前に、環境と関連アセット (仮想アセット、プロキシ、JDBC コントローラーなど) が新しい Virtualize サーバーに複製されます。Virtualize サーバーの名前と、アセットがコピーされる環境の名前を指定します。環境は、リリース パイプライン プロセスの後半で破棄されます。

Image Added

セットアップ前に関連データ リポジトリを複製するには、[Duplicate data repositories] を有効にします。

Image Added

リポジトリをコピーする場所を指定するには、次のいずれかのオプションを選択します。Choose one of the following options to specify where the repositories should be copied:

Scroll Table Layout
widths30%,70%

On the current Data Repository server
Creates a new copy on the same Data Repository server where the repositories currently exist. 
現在リポジトリがあるのと同じ Data Repository サーバーに新しくコピーを作成します。 
To a Data Repository server on the same host as the target Virtualize sever
Creates a new copy on the target Virtualize server. If you select this option, you will need to specify the Data Repository port, username, and password.
ターゲット Virtualize サーバーに新しいコピーを作成します。このオプションを選択した場合は、データ リポジトリ ポート、ユーザー名、およびパスワードを指定する必要があります。
To a Data Repository server on a specific host
Creates a new copy on the specified Data Repository. If you select this option, specify the Data Repository host, port, username, and password.

...

指定された Data Repository に新しくコピーを作成します。このオプションを選択した場合、Data Repository のホスト、ポート、ユーザー名、パスワードも指定します。

制御オプション 
Anchor
task-control-options
task-control-options

Enable the control options to configure the conditions under which the task should abort.制御オプションを有効にして、タスクを中止する条件を設定します。

  • Enable the エラーがあってもタスクを実行できるようにするには、[Continue on error option to allow the task to run even if errors are present.
  • Specify the number of minutes to allow the task to run before timing out in the Timeout field.
  • Choose a specific condition from the Run this task drop-down menu to specify additional behaviors. If you choose the Custom conditions option, you can specify an expression that controls the task. Refer to the Microsoft Azure DevOps documentation for additional information about custom conditions.

...

  • ] を有効にします。
  • [Timeout ] フィールドで、タイムアウトする前にタスクを実行する時間を分で指定します。
  • [Run this task] メニューから特定の条件を選択して、追加の動作を指定できます。 [Custom conditions] を選択した場合、タスクを制御する式を指定できます。カスタム条件の詳細については、Microsoft Azure DevOps のドキュメントを参照してください。

出力変数
Anchor
task-output-vars
task-output-vars

You can specify a list of output variables to associate with the task. Refer to the Microsoft Azure DevOps documentation for additional information about output variables.

Configuring an Execute Job Task

This task executes one of the test scenario jobs (tests suites that execute vs. specific environment configurations) available on the connected instance of Environment Manager. You can also publish the test execution results to DTP.

Image Removed

タスクに関連付ける出力変数のリストを指定できます。出力変数の詳細については、Microsoft Azure DevOps のドキュメントを参照してください。

Execute Job タスクの設定

このタスクは、テスト シナリオ ジョブ (特定の環境設定で実行されるテスト スイート) を実行します。テスト実行結果を DTP にパブリッシュすることもできます。

Image Added

以下のフィールドは必須です。The following fields are required:

Scroll Table Layout
widths30%,70%

Display name
Specifies a name for the task.

タスクの名前を指定します。

Parasoft CTP Endpoint
Specifies the CTP to use for the task. Choose an endpoint from the drop-down menu. See 
タスクに使用する CTP を指定します。「Configuring Service Connections
.
」を参照してください。
Job
Specifies the job to run. Choose an existing job from the drop-down menu.

Enable the Abort job after timeout option and specify the number of minutes in the Timeout minutes field that Azure DevOps should wait before the task stops with a timeout. 

実行するジョブを指定します。

[Abort job after timeout] を有効にし、タスクがタイムアウトで停止する前に Azure DevOps が待機すべき時間を [Timeout minutes] フィールドに分で指定します。 

ジョブの実行結果を Parasoft DTP にレポートする場合は、[Enable the Publish test execution results to DTP option if you want to report the job execution results to Parasoft DTP.] を有効にします。

Configure the following settings:

以下の設定を行います。

  • メニューから DTP インスタンスのサービス エンドポイントを選択します。
  • DTP プロジェクト、ビルド ID、セッション タグを指定します。プロジェクト、ビルド ID、セッション タグ、およびテストと開発成果物に関連するその他のメタデータの詳細については、DTP ドキュメントを参照してください。 
  • DTP にパブリッシュするときに、実行環境設定 (exec.env) をテスト結果に含める場合は、[
  • Choose the service endpoint for the instance of DTP from the drop-down menu.
  • Specify the DTP Project, build ID, and session tag. Refer to the DTP documentation for additional information about projects, build IDs, session tags, and other metadata associated with test and development artifacts. 
  • Enable the Append variable set environment to session tag if configured option if you want to include the execution environment setting (exec.env) in the test results when publishing to DTP. This enables you to aggregate test data according to execution environment, which can be displayed in DTP widgets and reports, e.g.:.
    Image Removed

Control Options

See Control Options.

Output Variables

See Output Variables.

Configuring a Destroy Environment Task

This build step deletes duplicate test environment to ensure that subsequent tests always begin with a clean test environment.

Image Removed

  • ] を有効にします。これにより、実行環境に応じてテスト データを集約し、DTP ウィジェットやレポートに表示することができます。例:
    Image Added

制御オプション

制御オプション」を参照してください。

出力変数

出力変数」を参照してください。

Destroy Environment タスクの設定

このビルドステップでは、重複したテスト環境を削除し、後続のテストが常にクリーンなテスト環境から開始されるようにします。

Image Added

以下のフィールドを指定します。Specify the following fields:

Scroll Table Layout
widths30%,70%

Display name
Specifies the name for the task.
タスクの名前を指定します。
Parasoft CTP Endpoint
Specifies the CTP to use for the task. Choose an endpoint from the drop-down menu. See 
タスクに使用する CTP を指定します。「Configuring Service Connections
.
」を参照してください。
System
Specifies the system in CTP that contains the environment instance you want to destroy.
破棄する環境インスタンスを含む CTP 内のシステムを指定します。  
Environment
Specifies the environment in the CTP system that contains the instance you want to destroy. This should match the name of the duplicate environment created in the 
破棄するインスタンスを含む CTP システム内の環境を指定します。これは、Configuring a Deploy Environment Task
 configuration.
構成で作成された複製環境の名前と一致する必要があります。

Control Options

See Control Options.

Output Variables

See Output Variables.

...

制御オプション

制御オプション」を参照してください。

出力変数

出力変数」を参照してください。

Disconnect Virtualize Server

...

タスクの設定

このタスクは、Environment Manager から指定された Virtualize サーバーの登録を削除します。サーバーが配置されている Parasoft CTP エンドポイントを指定し、切断するサーバーを識別するオプションを選択します。[by host] を有効にしてサーバーのホスト IP を指定するか、[by name] を有効にして Virtualize サーバーを切断するためのフィールドでサーバー名を指定します。

Image Added

制御オプション

制御オプション」を参照してください。

出力変数

出力変数」を参照してください。

タスクの進捗と結果の確認

進行中のタスクのコンソール出力を確認するには、進行状況リストでタスクをクリックします。すると、ステータス詳細と関連する Environment Manager ホストおよび環境へのリンクが表示されたページが開きます。 

This task de-registers a specified Virtualize server from Environment Manager. Specify the Parasoft CTP endpoint where the server is located and choose an option for identifying the server to disconnect. Enable the by host option and  specify the host IP of the server or enable the by name option and specify the server name in the field provided to disconnect a Virtualize server.

Image Removed

Control Options

See Control Options.

Output Variables

See Output Variables.

Reviewing Task Progress and Results

To view the console output for an in-progress task, click the task in the progress list. This opens a page with status details and links to the associated Environment Manager host and environments.