VSMobileCenterTest@0 - Mobile Center 測試 v0 工作

使用此工作來測試 Visual Studio Mobile Center 的行動應用程式套件。

Syntax

# Mobile Center Test v0
# Test mobile app packages with Visual Studio Mobile Center.
- task: VSMobileCenterTest@0
  inputs:
    app: # string. Required. Binary Application File Path. 
    artifactsDir: '$(Build.ArtifactStagingDirectory)/MobileCenterTest' # string. Required. Artifacts Directory. Default: $(Build.ArtifactStagingDirectory)/MobileCenterTest.
  # Prepare Tests
    #enablePrepare: true # boolean. Prepare Tests. Default: true.
    framework: 'appium' # 'appium' | 'espresso' | 'calabash' | 'uitest' | 'xcuitest'. Required when enablePrepare = true. Test Framework. Default: appium.
    #appiumBuildDir: # string. Required when enablePrepare = true && framework = appium. Build Directory. 
    #espressoBuildDir: # string. Optional. Use when enablePrepare = true && framework = espresso. Build Directory. 
    #espressoTestApkPath: # string. Optional. Use when enablePrepare = true && framework = espresso. Test APK Path. 
    #calabashProjectDir: # string. 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.
    #uitestBuildDir: # string. Required when enablePrepare = true && framework = uitest. Build Directory. 
    #uitestStoreFile: # string. Optional. Use when enablePrepare = true && framework = uitest. Store File. 
    #uitestStorePass: # string. Optional. Use when enablePrepare = true && framework = uitest. Store Password. 
    #uitestKeyAlias: # string. Optional. Use when enablePrepare = true && framework = uitest. Key Alias. 
    #uitestKeyPass: # string. Optional. Use when enablePrepare = true && framework = uitest. Key Password. 
    #uitestToolsDir: # string. Optional. Use when enablePrepare = true && framework = uitest. Test Tools Directory. 
    #signInfo: # string. Optional. Use when framework = calabash || framework = uitest. Signing Information. 
    #xcuitestBuildDir: # string. Optional. Use when enablePrepare = true && framework = xcuitest. Build Directory. 
    #xcuitestTestIpaPath: # string. Optional. Use when enablePrepare = true && framework = xcuitest. Test IPA Path. 
    #prepareOpts: # string. Optional. Use when enablePrepare = true. Additional Options. 
  # Run Tests
    #enableRun: true # boolean. Run Tests. Default: true.
    credsType: 'serviceEndpoint' # 'serviceEndpoint' | 'inputs'. Required when enableRun = true. Authentication Method. Default: serviceEndpoint.
    #serverEndpoint: # string. Required when enableRun = true && credsType = serviceEndpoint. Mobile Center Connection. 
    #username: # string. Required when enableRun = true && credsType = inputs. Mobile Center Username. 
    #password: # string. Required when enableRun = true && credsType = inputs. Mobile 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.
    #dsymDir: # string. Optional. Use when enableRun = true. dSYM Directory. 
    locale: 'en_US' # 'da_DK' | 'nl_NL' | 'en_GB' | 'en_US' | 'fr_FR' | 'de_DE' | 'ja_JP' | 'ru_RU' | 'es_MX' | 'es_ES' | 'user'. Required when enableRun = true. System Language. Default: en_US.
    #userDefinedLocale: # string. Optional. Use when enableRun = true && locale = user. Other Locale. 
    #loginOpts: # string. Optional. Use when enableRun = true && credsType = inputs. Addtional Options for Login. 
    #runOpts: # string. Optional. Use when enableRun = true. Additional Options for Run. 
    #async: false # boolean. Optional. Use when enableRun = true. Do not wait for test result. Default: false.
  # Advanced
    #cliLocationOverride: # string. mobile-center CLI Location. 
    #debug: false # boolean. Enable Debug Output. Default: false.

輸入

app - 二進位應用程式文件路徑
string. 必要。

指定從存放庫根目錄到的相對路徑。APK 或 。您想要測試的 IPA 檔案。


artifactsDir - Artifacts 目錄
string. 必要。 預設值:$(Build.ArtifactStagingDirectory)/MobileCenterTest

指定目錄,以放置準備步驟所產生的成品,並供執行步驟使用。 如果目錄不存在,就會建立目錄。


enablePrepare - 準備測試
boolean. 預設值:true

如果設定為 true,則會準備測試。


framework - Test Framework
string. 當 enablePrepare = true 時為必要。 允許的值:appium、、espressocalabashuitest (Xamarin UI 測試) 。 xcuitest 預設值:appium

指定工作將使用的測試架構。


appiumBuildDir - 組建目錄
string. 當 enablePrepare = true && framework = appium 時為必要。

指定包含 Appium 測試之目錄的路徑。


espressoBuildDir - 組建目錄
string. 選擇性。 使用時機 enablePrepare = true && framework = espresso

指定輸出目錄的路徑。


espressoTestApkPath - 測試 APK 路徑
string. 選擇性。 使用時機 enablePrepare = true && framework = espresso

使用 一般測試來指定 APK 檔案的路徑。 如果未設定值, build-dir 則會用來尋找 APK 檔案。 允許使用萬用字元。


calabashProjectDir - 項目目錄
string. 當 enablePrepare = true && framework = calabash 時為必要。

指定一個路徑,以取得一個 Workspacebash 工作區目錄。


calabashConfigFile - Cucumber 組態檔
string. 選擇性。 使用時機 enablePrepare = true && framework = calabash

指定 Cucumber 組態檔的檔案路徑,通常是 cucumber.yml


calabashProfile - 要執行的配置檔
string. 選擇性。 使用時機 enablePrepare = true && framework = calabash

指定要執行的設定檔。 此值必須存在於 Cucumber 組態檔中。


calabashSkipConfigCheck - 略過設定檢查
boolean. 選擇性。 使用時機 enablePrepare = true && framework = calabash。 預設值:false

強制工作在沒有 Cucumber 配置檔的情況下執行。


uitestBuildDir - 組建目錄
string. 當 enablePrepare = true && framework = uitest 時為必要。

指定具有建置測試元件的目錄路徑。


uitestStoreFile - 儲存盤案
string. 選擇性。 使用時機 enablePrepare = true && framework = uitest

指定存放區檔案的路徑。


uitestStorePass - 儲存密碼
string. 選擇性。 使用時機 enablePrepare = true && framework = uitest

指定存放區檔案的密碼。 使用新的變數,並在 [變數] 索引標籤上啟用鎖定來加密此值。


uitestKeyAlias - 索引鍵別名
string. 選擇性。 使用時機 enablePrepare = true && framework = uitest

指定識別存放區檔案中使用的公開/私鑰組的別名。


uitestKeyPass - 金鑰密碼
string. 選擇性。 使用時機 enablePrepare = true && framework = uitest

指定別名和儲存盤案的金鑰密碼。 使用新的變數,並在 [變數] 索引標籤上啟用鎖定來加密此值。


uitestToolsDir - 測試工具 目錄
string. 選擇性。 使用時機 enablePrepare = true && framework = uitest

使用包含的 Xamarin UI 測試工具 test-cloud.exe指定目錄的路徑。


signInfo - 簽署資訊
string. 選擇性。 使用時機 framework = calabash || framework = uitest

使用簽署資訊來簽署測試伺服器。


xcuitestBuildDir - 組建目錄
string. 選擇性。 使用時機 enablePrepare = true && framework = xcuitest

指定組建輸出目錄的路徑,通常是 $(ProjectDir)/Build/Products/Debug-iphoneos


xcuitestTestIpaPath - 測試 IPA 路徑
string. 選擇性。 使用時機 enablePrepare = true && framework = xcuitest

使用 XCUITest 測試指定檔案的路徑 *.ipa


prepareOpts - 其他選項
string. 選擇性。 使用時機 enablePrepare = true

指定要傳遞至 mobile-center test prepare step的其他自變數。


enableRun - 執行測試
boolean. 預設值:true


credsType - 驗證方法
string. 當 enableRun = true 時為必要。 允許的值: serviceEndpoint (Mobile Center 連線) , inputs (認證) 。 預設值:serviceEndpoint

指定驗證方法。 使用Mobile Center服務端點連線,或指定認證以連線到Visual StudioMobile Center。


serverEndpoint - 行動中心連線
string. 當 enableRun = true && credsType = serviceEndpoint 時為必要。

指定 Visual Studio Mobile Center 連線的服務端點。 若要建立一個,請按兩下 [ 管理] 連結 並建立新的服務端點。


username - Mobile Center 用戶名稱
string. 當 enableRun = true && credsType = inputs 時為必要。

請造訪 Azure Mobile Center 來設定您的用戶名稱。


password - Mobile Center 密碼
string. 當 enableRun = true && credsType = inputs 時為必要。

請造訪 Azure 行動中心 來設定密碼。 此字串可以接受組建/發行定義中定義的變數作為 $(passwordVariable)。 您可以將變數類型標示為 secret 來保護它。


appSlug - 應用程式 Slug
string. 當 enableRun = true 時為必要。

應用程式 slug 格式 {username}/{app_identifier}為 。 若要尋找 {username}{app_identifier} 尋找應用程式,請在 Azure Mobile Apps 上尋找應用程式清單。 URL 格式 https://mobile.azure.com/users/{username}/apps/{app_identifier}為 。


devices - 設備
string. 當 enableRun = true 時為必要。

識別此測試將針對哪些裝置執行。 當您從Mobile Center 測試指標定義新的測試回合時,請複製並貼上此字串。


series - 測試系列
string. 選擇性。 使用時機 enableRun = true。 預設值:master

指定組織測試回合 (的數列名稱,例如 masterproduction) beta


dsymDir - dSYM 目錄
string. 選擇性。 使用時機 enableRun = true

指定包含 iOS 符號檔之 dSYM 目錄的路徑。


locale - 系統語言
string. 當 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

如果未顯示您的語言,請指定 [其他 ] 並輸入其地區設定,例如 en_US


userDefinedLocale - 其他地區設定
string. 選擇性。 使用時機 enableRun = true && locale = user

以 格式 [language]_[country]指定任何雙字母 ISO-639 語言代碼,以及任何雙字母 ISO 3166 國家/地區代碼,例如 en_US


loginOpts - 登入的附加選項
string. 選擇性。 使用時機 enableRun = true && credsType = inputs

指定傳遞至 mobile-center login step的其他自變數。


runOpts - 執行的其他選項
string. 選擇性。 使用時機 enableRun = true

指定傳遞至 mobile-center test run的其他自變數。


async - 不要等候測試結果
boolean. 選擇性。 使用時機 enableRun = true。 預設值:false

當設定為 true時,會以異步方式執行命令,並在上傳測試時結束,而不需要等候測試結果。


cliLocationOverride - mobile-center CLI 位置
string.

指定命令行介面 (CLI) 的路徑 mobile-center


debug - 啟用偵錯輸出
boolean. 預設值:false

將 新增 --debugmobile-center 命令行介面 (CLI) 。


工作控制選項

除了工作輸入之外,所有工作都有控制選項。 如需詳細資訊,請參閱 控件選項和一般工作屬性

輸出變數

無。

規格需求

需求 描述
管線類型 YAML,傳統組建
執行於 Agent、DeploymentGroup
要求
Capabilities 此工作不符合作業中後續工作的任何需求。
命令限制 任何
Settable 變數 任何
代理程式版本 所有支援的代理程式版本。
工作類別 測試