RunVisualStudioTestsusingTestAgent@1 - 機能テスト v1 タスクを実行する

RunVisualStudioTestsusingTestAgent@1とそのコンパニオン タスク (Visual Studio テスト エージェントの配置) は非推奨になりました。 代わりに Visual Studio テスト タスクを使用してください。 VSTest タスクでは、単体テストと機能テストを実行できます。 マルチエージェント ジョブ設定を使用して、1 つ以上のエージェントでテストを実行します。 Visual Studio テスト プラットフォーム タスクを使用して、エージェントで Visual Studio を必要とせずにテストを実行します。 VSTest タスクには、失敗したテストを自動的に再実行するなどの新しい機能も用意されています。

構文

# Run functional tests v1
# Deprecated: This task and it’s companion task (Visual Studio Test Agent Deployment) are deprecated. Use the 'Visual Studio Test' task instead. The VSTest task can run unit as well as functional tests. Run tests on one or more agents using the multi-agent job setting. Use the 'Visual Studio Test Platform' task to run tests without needing Visual Studio on the agent. VSTest task also brings new capabilities such as automatically rerunning failed tests.
- task: RunVisualStudioTestsusingTestAgent@1
  inputs:
  # Setup Options
    testMachineGroup: # string. Required. Machines. 
    dropLocation: # string. Required. Test Drop Location. 
  # Execution Options
    testSelection: 'testAssembly' # 'testAssembly' | 'testPlan'. Required. Test Selection. Default: testAssembly.
    #testPlan: # string. Required when testSelection = testPlan. Test Plan. 
    #testSuite: # string. Required when testSelection = testPlan. Test Suite. 
    #testConfiguration: # string. Required when testSelection = testPlan. Test Configuration. 
    sourcefilters: '**\*test*.dll' # string. Required when testSelection = testAssembly. Test Assembly. Default: **\*test*.dll.
    #testFilterCriteria: # string. Optional. Use when testSelection = testAssembly. Test Filter criteria. 
    #runSettingsFile: # string. Run Settings File. 
    #overrideRunParams: # string. Override Test Run Parameters. 
    #codeCoverageEnabled: false # boolean. Code Coverage Enabled. Default: false.
    #customSlicingEnabled: false # boolean. Distribute tests by number of machines. Default: false.
  # Reporting Options
    #testRunTitle: # string. Test Run Title. 
    #platform: # string. Platform. 
    #configuration: # string. Configuration. 
    #testConfigurations: # string. Test Configurations. 
    #autMachineGroup: # string. Application Under Test Machines.
# Run Functional Tests v1
# Deprecated: This task and it’s companion task (Visual Studio Test Agent Deployment) are deprecated. Use the 'Visual Studio Test' task instead. The VSTest task can run unit as well as functional tests. Run tests on one or more agents using the multi-agent job setting. Use the 'Visual Studio Test Platform' task to run tests without needing Visual Studio on the agent. VSTest task also brings new capabilities such as automatically rerunning failed tests.
- task: RunVisualStudioTestsusingTestAgent@1
  inputs:
  # Setup Options
    testMachineGroup: # string. Required. Machines. 
    dropLocation: # string. Required. Test Drop Location. 
  # Execution Options
    testSelection: 'testAssembly' # 'testAssembly' | 'testPlan'. Required. Test Selection. Default: testAssembly.
    #testPlan: # string. Required when testSelection = testPlan. Test Plan. 
    #testSuite: # string. Required when testSelection = testPlan. Test Suite. 
    #testConfiguration: # string. Required when testSelection = testPlan. Test Configuration. 
    sourcefilters: '**\*test*.dll' # string. Required when testSelection = testAssembly. Test Assembly. Default: **\*test*.dll.
    #testFilterCriteria: # string. Optional. Use when testSelection = testAssembly. Test Filter criteria. 
    #runSettingsFile: # string. Run Settings File. 
    #overrideRunParams: # string. Override Test Run Parameters. 
    #codeCoverageEnabled: false # boolean. Code Coverage Enabled. Default: false.
    #customSlicingEnabled: false # boolean. Distribute tests by number of machines. Default: false.
  # Reporting Options
    #testRunTitle: # string. Test Run Title. 
    #platform: # string. Platform. 
    #configuration: # string. Configuration. 
    #testConfigurations: # string. Test Configurations. 
    #autMachineGroup: # string. Application Under Test Machines.

入力

testMachineGroup - マシン
string. 必須です。

マシンの FQDN または IP アドレスのコンマ区切りの一覧。ポート番号を含めることができます。 最大は 32 台のマシンまたは 32 個のエージェントです。 リスト アイテムは次の場合があります。

  • Azure リソース グループの名前。
  • コンピューター名のコンマ区切りの一覧。 例 : dbserver.fabrikam.com,dbserver_int.fabrikam.com:5986,192.168.34:5986
  • 前のタスクの出力変数。

dropLocation - テストドロップの場所
string. 必須です。

テスト バイナリが Windows マシン ファイル コピー または Azure ファイル コピー タスクによってコピーされたテスト コンピューター上の場所を指定します。 テスト エージェント マシンからのシステム ステージ変数を使用して、ドロップの場所を指定できます。 例: c:\tests および %systemdrive%\Tests


testSelection - テストの選択
string. 必須です。 使用できる値: testAssembly (テスト アセンブリ)、 testPlan (テスト 計画)。 既定値: testAssembly

テストの実行方法を指定します。テスト アセンブリまたはテスト 計画を使用します。


testPlan - テスト計画
string. testSelection = testPlan の場合に必要です。

このorganization用に既に構成されているテスト 計画を指定します。


testSuite - Test Suite
string. testSelection = testPlan の場合に必要です。

選択したテスト 計画のテスト スイートを指定します。


testConfiguration - テスト構成
string. testSelection = testPlan の場合に必要です。

選択したテスト 計画のテスト構成を指定します。


sourcefilters - テスト アセンブリ
string. testSelection = testAssembly の場合に必要です。 既定値: **\*test*.dll

テストを実行するテスト バイナリを指定します。 ワイルドカードを使用できます。 たとえば、**\*test*.dll;ファイル名に をtest含むすべての.dllファイルについてです。


testFilterCriteria - テスト フィルターの条件
string. 省略可能。 の場合は testSelection = testAssemblyを使用します。

テスト アセンブリ ファイル内で実行するテストを指定するフィルター。 の オプションvstest.console.exe/TestCaseFilter同じように動作します。 例: Owner=james&Priority=1.


runSettingsFile - 設定ファイルの実行
string.

テストで使用する または testsettings ファイルへのrunsettingsファイル パスを指定します。


overrideRunParams - テスト実行パラメーターのオーバーライド
string.

ファイルのセクションまたはファイルのTestRunParametersrunsettingsセクションで定義されているオーバーライド パラメーターをPropertiestestsettings指定します。 例: AppURL=$(DeployURL);Port=8080.

Note

ファイルで testsettings 指定されたプロパティには、テスト エージェント 2017 Update 4 以降を使用して TestContext アクセスできます。


codeCoverageEnabled - コード カバレッジが有効
boolean. 既定値: false

タスクに対してコード カバレッジを有効にするかどうかを指定します。


customSlicingEnabled - マシン数別にテストを配布する
boolean. 既定値: false

このブール値が に true設定されている場合、テストコンテナーの数ではなく、指定されたマシンの数に基づいてテストが分散されます。

Note

内の .dll テストは、複数のマシンに配布される場合もあります。


testRunTitle - テスト実行のタイトル
string.

テスト実行の名前を指定します。


platform - プラットフォーム
string.

テストを報告するプラットフォームを指定します。 ビルド タスクで の platform 変数を定義している場合は、 変数を値として使用します。


configuration - 構成
string.

テストを報告する構成を指定します。 ビルド タスクで の configuration 変数を定義している場合は、 変数を値として使用します。


testConfigurations - テスト構成
string.

省略可能。 テスト ケース フィルターをテスト構成 ID に関連付けます。 構文: <Filter1>:<Id1>;DefaultTestConfiguration:<Id3>。 例: FullyQualifiedName~Chrome:12.


autMachineGroup - テスト マシンの下のアプリケーション
string.

サーバー プロセス (など W3WP.exe) が実行されているマシン、出力変数、またはマシン グループ名のコンマ区切りの一覧。


タスク制御オプション

すべてのタスクには、タスク入力に加えて制御オプションがあります。 詳細については、「 コントロール オプションと一般的なタスク プロパティ」を参照してください。

出力変数

[なし] :

必要条件

要件 説明
パイプラインの種類 YAML、クラシック ビルド、クラシック リリース
上で実行 エージェント
確認要求 なし
Capabilities このタスクは、ジョブ内の後続のタスクに対する要求を満たしていません。
コマンドの制限 Any
設定可能な変数 Any
エージェントのバージョン 1.104.0 以上
タスクのカテゴリ テスト