次の方法で共有


AppCenterTest@1 - App Center テスト v1 タスク

Visual Studio App Center を使用してアプリ パッケージをテストします。

構文

# App Center test v1
# Test app packages with Visual Studio App Center.
- task: AppCenterTest@1
  inputs:
    appFile: # string. Alias: app. Required. Binary application file path. 
    artifactsDirectory: '$(Build.ArtifactStagingDirectory)/AppCenterTest' # string. Alias: artifactsDir. Required. Artifacts directory. Default: $(Build.ArtifactStagingDirectory)/AppCenterTest.
  # Prepare Tests
    #prepareTests: true # boolean. Alias: enablePrepare. Prepare tests. Default: true.
    frameworkOption: 'appium' # 'appium' | 'espresso' | 'calabash' | 'uitest' | 'xcuitest'. Alias: framework. Required when enablePrepare = true. Test framework. Default: appium.
    #appiumBuildDirectory: # string. Alias: appiumBuildDir. Required when enablePrepare = true && framework = appium. Build directory. 
    #espressoBuildDirectory: # string. Alias: espressoBuildDir. Optional. Use when enablePrepare = true && framework = espresso. Build directory. 
    #espressoTestApkFile: # string. Alias: espressoTestApkPath. Optional. Use when enablePrepare = true && framework = espresso. Test APK path. 
    #calabashProjectDirectory: # string. Alias: calabashProjectDir. Required when enablePrepare = true && framework = calabash. Project directory. 
    #calabashConfigFile: # string. Optional. Use when enablePrepare = true && framework = calabash. Cucumber config file. 
    #calabashProfile: # string. Optional. Use when enablePrepare = true && framework = calabash. Profile to run. 
    #calabashSkipConfigCheck: false # boolean. Optional. Use when enablePrepare = true && framework = calabash. Skip Configuration Check. Default: false.
    #uiTestBuildDirectory: # string. Alias: uitestBuildDir. Required when enablePrepare = true && framework = uitest. Build directory. 
    #uitestStorePath: # string. Optional. Use when enablePrepare = true && framework = uitest. Store file. 
    #uiTestStorePassword: # string. Alias: uitestStorePass. Optional. Use when enablePrepare = true && framework = uitest. Store password. 
    #uitestKeyAlias: # string. Optional. Use when enablePrepare = true && framework = uitest. Key alias. 
    #uiTestKeyPassword: # string. Alias: uitestKeyPass. Optional. Use when enablePrepare = true && framework = uitest. Key password. 
    #uiTestToolsDirectory: # string. Alias: uitestToolsDir. Optional. Use when enablePrepare = true && framework = uitest. Test tools directory. 
    #signInfo: # string. Optional. Use when framework = calabash || framework = uitest. Signing information. 
    #xcUITestBuildDirectory: # string. Alias: xcuitestBuildDir. Optional. Use when enablePrepare = true && framework = xcuitest. Build directory. 
    #xcUITestIpaFile: # string. Alias: xcuitestTestIpaPath. Optional. Use when enablePrepare = true && framework = xcuitest. Test IPA path. 
    #prepareOptions: # string. Alias: prepareOpts. Optional. Use when enablePrepare = true. Additional options. 
  # Run Tests
    #runTests: true # boolean. Alias: enableRun. Run tests. Default: true.
    credentialsOption: 'serviceEndpoint' # 'serviceEndpoint' | 'inputs'. Alias: credsType. Required when enableRun = true. Authentication method. Default: serviceEndpoint.
    #serverEndpoint: # string. Required when enableRun = true && credsType = serviceEndpoint. App Center service connection. 
    #username: # string. Required when enableRun = true && credsType = inputs. App Center username. 
    #password: # string. Required when enableRun = true && credsType = inputs. App Center password. 
    appSlug: # string. Required when enableRun = true. App slug. 
    devices: # string. Required when enableRun = true. Devices. 
    #series: 'master' # string. Optional. Use when enableRun = true. Test series. Default: master.
    #dsymDirectory: # string. Alias: dsymDir. Optional. Use when enableRun = true. dSYM directory. 
    localeOption: 'en_US' # 'da_DK' | 'nl_NL' | 'en_GB' | 'en_US' | 'fr_FR' | 'de_DE' | 'ja_JP' | 'ru_RU' | 'es_MX' | 'es_ES' | 'user'. Alias: locale. Required when enableRun = true. System language. Default: en_US.
    #userDefinedLocale: # string. Optional. Use when enableRun = true && locale = user. Other locale. 
    #loginOptions: # string. Alias: loginOpts. Optional. Use when enableRun = true && credsType = inputs. Additional options for login. 
    #runOptions: # string. Alias: runOpts. Optional. Use when enableRun = true. Additional options for run. 
    #skipWaitingForResults: false # boolean. Alias: async. Optional. Use when enableRun = true. Do not wait for test result. Default: false.
  # Advanced
    #cliFile: # string. Alias: cliLocationOverride. App Center CLI location. 
    #showDebugOutput: false # boolean. Alias: debug. Enable debug output. Default: false.

入力

バイナリ アプリケーション ファイルパスappFile - する
入力エイリアス: appstring. 必須。

テストする APK または IPA ファイルへのリポジトリ ルートからの相対パス。


artifactsDirectory - Artifacts ディレクトリ
入力エイリアス: artifactsDirstring. 必須。 既定値: $(Build.ArtifactStagingDirectory)/AppCenterTest.

準備ステップによって生成され、実行ステップによって使用される成果物を配置する場所を指定します。 このディレクトリがまだ存在しない場合は作成されます。


prepareTests - テスト を準備する
入力エイリアス: enablePrepareboolean. 既定値: true.

trueに設定すると、この入力によってテストが準備されます。


frameworkOption - テスト フレームワークの
入力エイリアス: frameworkstring. enablePrepare = trueする場合に必要です。 使用できる値: appiumespressocalabashuitest (Xamarin UI テスト)、xcuitest。 既定値: appium.


appiumBuildDirectory - ビルド ディレクトリ
入力エイリアス: appiumBuildDirstring. enablePrepare = true && framework = appiumする場合に必要です。

Appium テストを含むディレクトリへのパス。


espressoBuildDirectory - ビルド ディレクトリ
入力エイリアス: espressoBuildDirstring. 任意 enablePrepare = true && framework = espressoするときに使用します。

Espresso 出力ディレクトリへのパス。


espressoTestApkFile - テスト APK パス
入力エイリアス: espressoTestApkPathstring. 任意 enablePrepare = true && framework = espressoするときに使用します。

エスプレッソ テストを含む APK ファイルへのパス。 設定されていない場合は、build-dir を使用して検出されます。 ワイルドカードを使用できます。


calabashProjectDirectory - Project ディレクトリ
入力エイリアス: calabashProjectDirstring. enablePrepare = true && framework = calabashする場合に必要です。

Calabash ワークスペース ディレクトリへのパス。


calabashConfigFile - の構成ファイルの
string. 任意 enablePrepare = true && framework = calabashするときに使用します。

通常はCucumber.yml、この構成ファイルへのパス。


を実行するプロファイルを calabashProfile - する
string. 任意 enablePrepare = true && framework = calabashするときに使用します。

実行するプロファイル。 この値は、1 つの構成ファイルに存在する必要があります。


calabashSkipConfigCheck - 構成チェック をスキップする
boolean. 任意 enablePrepare = true && framework = calabashするときに使用します。 既定値: false.

trueに設定すると、この入力は、リコプロファイルで指定された設定チェックをスキップします。


uiTestBuildDirectory - ビルド ディレクトリ
入力エイリアス: uitestBuildDirstring. enablePrepare = true && framework = uitestする場合に必要です。

ビルドされたテスト アセンブリを含むディレクトリへのパス。


uitestStorePath - ストア ファイルの
string. 任意 enablePrepare = true && framework = uitestするときに使用します。

アプリの署名に使用されるストア ファイルへのパス。


uiTestStorePassword - Store パスワード
入力エイリアス: uitestStorePassstring. 任意 enablePrepare = true && framework = uitestするときに使用します。

アプリの署名に使用されるストア ファイルのパスワード。 この値を暗号化するには、[変数] タブでロックが有効になっている新しい変数を使用します。


uitestKeyAlias - キーエイリアスの
string. 任意 enablePrepare = true && framework = uitestするときに使用します。

ストア ファイルで使用される公開キーと秘密キーのペアを識別するエイリアスを指定します。


キー パスワードuiTestKeyPassword -
入力エイリアス: uitestKeyPassstring. 任意 enablePrepare = true && framework = uitestするときに使用します。

エイリアスとストア ファイルのキー パスワードを指定します。 この値を暗号化するには、[変数] タブでロックが有効になっている新しい変数を使用します。


uiTestToolsDirectory - テスト ツールのディレクトリ
入力エイリアス: uitestToolsDirstring. 任意 enablePrepare = true && framework = uitestするときに使用します。

test-cloud.exeを含む Xamarin UI テスト ツールを含むディレクトリへのパス。


signInfo - 署名情報
string. 任意 framework = calabash || framework = uitestするときに使用します。

テスト サーバーに署名します。


xcUITestBuildDirectory - ビルド ディレクトリ
入力エイリアス: xcuitestBuildDirstring. 任意 enablePrepare = true && framework = xcuitestするときに使用します。

ビルド出力ディレクトリへのパス (通常は $(ProjectDir)/Build/Products/Debug-iphoneos)。


xcUITestIpaFile - テスト IPA パス
入力エイリアス: xcuitestTestIpaPathstring. 任意 enablePrepare = true && framework = xcuitestするときに使用します。

XCUITest テストを含む .ipa ファイルへのパス。


prepareOptions - その他のオプション
入力エイリアス: prepareOptsstring. 任意 enablePrepare = trueするときに使用します。

App Center テスト準備手順に渡される追加の引数。


runTests - テスト を実行する
入力エイリアス: enableRunboolean. 既定値: true.

テストを実行します。


credentialsOption - 認証方法の
入力エイリアス: credsTypestring. enableRun = trueする場合に必要です。 使用できる値: serviceEndpoint (App Center サービス接続)、inputs (資格情報)。 既定値: serviceEndpoint.

App Center サービス接続を使用するか、資格情報を入力して Visual Studio App Center に接続します。


App Center サービス接続serverEndpoint -
string. enableRun = true && credsType = serviceEndpointする場合に必要です。

Visual Studio App Center のサービス接続を選択します。 必要に応じて、[管理] リンクをクリックして新しいサービス接続を作成します。


username - App Center のユーザー名
string. enableRun = true && credsType = inputsする場合に必要です。

App Center のサインイン ページにアクセスしてユーザー名を作成し、ここで値を指定します。


App Center のパスワードpassword - する
string. enableRun = true && credsType = inputsする場合に必要です。

App Center のサインイン ページにアクセスしてパスワードを設定し、ここで値を指定します。 $(passwordVariable) としてビルド パイプラインまたはリリース パイプラインで定義されている変数が受け入れられます。 変数の型は、セキュリティで保護するために secret としてマークできます。


appSlug - アプリのスラッグ
string. enableRun = trueする場合に必要です。

アプリのスラッグは <username>/<app_identifier>の形式です。 アプリの <username><app_identifier> を見つけるには、Visual Studio App Center からその名前クリックします。 結果の URL は、https://appcenter.ms/users/<username>/apps/<app_identifier>形式になります。


devices - デバイスの
string. enableRun = trueする場合に必要です。

このテストが実行されるデバイスを識別します。 Visual Studio App Center テスト ビーコンから新しいテスト実行を定義するときに、この文字列をコピーして貼り付けます。


series - テスト シリーズの
string. 任意 enableRun = trueするときに使用します。 既定値: master.

テストの実行を整理するための系列名 (マスター、運用、ベータなど)。


dSYM ディレクトリdsymDirectory - する
入力エイリアス: dsymDirstring. 任意 enableRun = trueするときに使用します。

iOS シンボル ファイルへのパス。


localeOption - システム言語の
入力エイリアス: localestring. enableRun = trueする場合に必要です。 使用できる値: da_DK (デンマーク語)、nl_NL (オランダ語 (オランダ))、en_GB (英語 (英国))、en_US (英語 (米国))、fr_FR (フランス語 (フランス))、fr_FRde_DE (ドイツ語)、ja_JP (日本)、ru_RU (ロシア語 (ロシア))、es_MX (スペイン語 (メキシコ))、es_ES (スペイン語 (スペイン))、user (その他)。 既定値: en_US.

言語が表示されない場合に利用します。 Other を選択し、そのロケール (en_USなど) を入力します。


userDefinedLocale - その他のロケールの
string. 任意 enableRun = true && locale = userするときに使用します。

2 文字の ISO-639 言語コードと 2 文字の ISO 3166 国コードを <language>_<country>形式で入力します (例: en_US)。


loginOptions - ログイン の追加オプション
入力エイリアス: loginOptsstring. 任意 enableRun = true && credsType = inputsするときに使用します。

Visual Studio App Center ログイン ステップに渡される追加の引数。


runOptions - 実行 の追加オプション
入力エイリアス: runOptsstring. 任意 enableRun = trueするときに使用します。

Visual Studio App Center のテスト実行に渡される追加の引数。


skipWaitingForResults - テスト結果の を待たない
入力エイリアス: asyncboolean. 任意 enableRun = trueするときに使用します。 既定値: false.

コマンドを非同期的に実行し、テスト結果を待たずにテストがアップロードされると終了します。


cliFile - App Center CLI の場所の
入力エイリアス: cliLocationOverridestring.

ビルドエージェントまたはリリース エージェント上の Visual Studio App Center CLI へのパス。


デバッグ出力を有効にする showDebugOutput -
入力エイリアス: debugboolean. 既定値: false.

Visual Studio App Center CLI に --debug を追加します。


タスク コントロールのオプション

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

出力変数

なし。

注釈

このタスクでは、App Center Test を使用して、アプリケーション バイナリ (.apk または .ipa ファイル) に対してテスト スイートを実行できます。

  • 最初に App Center にサインアップします。
  • このタスクの使用方法の詳細については、App Center のドキュメント記事「UI テストに Azure DevOps を使用する」を参照してください。

例示

この例では、App Center テスト タスクを使用して Android アプリでエスプレッソ テストを実行します。

steps:
- task: AppCenterTest@1
  displayName: 'Espresso Test - Synchronous'
  inputs:
    appFile: 'Espresso/espresso-app.apk'
    artifactsDirectory: '$(Build.ArtifactStagingDirectory)/AppCenterTest'
    frameworkOption: espresso
    espressoBuildDirectory: Espresso
    serverEndpoint: 'myAppCenterServiceConnection'
    appSlug: 'xplatbg1/EspressoTests'
    devices: a84c93af

必要条件

要件 説明
パイプラインの種類 YAML、クラシック ビルド
実行日 エージェント、DeploymentGroup
の需要 なし
機能の このタスクは、ジョブ内の後続のタスクに対する要求を満たしていません。
コマンドの制限 どれでも
設定可能な変数 どれでも
エージェントのバージョン 2.206.1 以上
タスク カテゴリ テスト
要件 説明
パイプラインの種類 YAML、クラシック ビルド
実行日 エージェント、DeploymentGroup
の需要 なし
機能の このタスクは、ジョブ内の後続のタスクに対する要求を満たしていません。
コマンドの制限 どれでも
設定可能な変数 どれでも
エージェントのバージョン 2.144.0 以上
タスク カテゴリ テスト
要件 説明
パイプラインの種類 YAML、クラシック ビルド
実行日 エージェント、DeploymentGroup
の需要 なし
機能の このタスクは、ジョブ内の後続のタスクに対する要求を満たしていません。
コマンドの制限 どれでも
設定可能な変数 どれでも
エージェントのバージョン サポートされているすべてのエージェント バージョン。
タスク カテゴリ テスト