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.
# 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. 
    #uitestStoreFile: # 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 の場合に必要です。 使用できる値: appium、、、 calabashuitest (Xamarin UI テスト)、xcuitestespresso。 既定値: 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 - プロジェクト ディレクトリ
入力エイリアス: calabashProjectDirstring. enablePrepare = true && framework = calabash の場合に必要です。

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


calabashConfigFile - Cucumber 構成ファイル
string. 省略可能。 の場合は enablePrepare = true && framework = calabashを使用します。

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


calabashProfile - 実行するプロファイル
string. 省略可能。 の場合は enablePrepare = true && framework = calabashを使用します。

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


calabashSkipConfigCheck - 構成チェックをスキップする
boolean. 省略可能。 の場合は enablePrepare = true && framework = calabashを使用します。 既定値: false

true設定すると、この入力は、Cucumber プロファイルで指定チェック構成をスキップします。


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

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


uitestStorePath - ストア ファイル
string. 省略可能。 の場合は enablePrepare = true && framework = uitestを使用します。

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


uiTestStorePassword - パスワードを保存する
入力エイリアス: uitestStorePassstring. 省略可能。 の場合は enablePrepare = true && framework = uitestを使用します。

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


uitestKeyAlias - キーエイリアス
string. 省略可能。 の場合は enablePrepare = true && framework = uitestを使用します。

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


uiTestKeyPassword - キー パスワード
入力エイリアス: uitestKeyPassstring. 省略可能。 の場合は enablePrepare = true && framework = uitestを使用します。

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


uiTestToolsDirectory - テスト ツール ディレクトリ
入力エイリアス: uitestToolsDirstring. 省略可能。 の場合は enablePrepare = true && framework = uitestを使用します。

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


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 に接続します。


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

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


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

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


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

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


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

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


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

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


series - テスト シリーズ
string. 省略可能。 の場合は enableRun = trueを使用します。 既定値: master

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


dsymDirectory - dSYM ディレクトリ
入力エイリアス: dsymDirstring. 省略可能。 の場合は enableRun = trueを使用します。

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


localeOption - システム言語
入力エイリアス: localestring. enableRun = true の場合に必要です。 使用できる値: da_DK (デンマーク語 (デンマーク)、 nl_NL (オランダ語 (オランダ語)、 en_GB (英語 (イギリス))、 en_US (英語 (米国)、 fr_FR (フランス語 (フランス))、 de_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 します。


uitestStoreFile - ストア ファイル
string. 省略可能。 の場合は enablePrepare = true && framework = uitestを使用します。


タスク制御オプション

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

出力変数

[なし] :

解説

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

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