Skip to content

Latest commit

 

History

History
686 lines (572 loc) · 30.6 KB

app-center-test-v1.md

File metadata and controls

686 lines (572 loc) · 30.6 KB
title description ms.date monikerRange
AppCenterTest@1 - App Center test v1 task
Test app packages with Visual Studio App Center.
05/17/2024
<=azure-pipelines

AppCenterTest@1 - App Center test v1 task

:::moniker range="<=azure-pipelines"

Test app packages with Visual Studio App Center.

:::moniker-end

Syntax

:::moniker range=">=azure-pipelines-2019.1"

# 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.

:::moniker-end

:::moniker range="=azure-pipelines-2019"

# 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.

:::moniker-end

Inputs

:::moniker range="<=azure-pipelines"

appFile - Binary application file path
Input alias: app. string. Required.

The relative path from the repo root to the APK or IPA file you want to test.


:::moniker-end

:::moniker range="<=azure-pipelines"

artifactsDirectory - Artifacts directory
Input alias: artifactsDir. string. Required. Default value: $(Build.ArtifactStagingDirectory)/AppCenterTest.

Specifies where to place the artifacts produced by the prepare step and used by the run step. This directory will be created if it does not already exist.


:::moniker-end

:::moniker range="<=azure-pipelines"

prepareTests - Prepare tests
Input alias: enablePrepare. boolean. Default value: true.

When set to true, this input prepares the tests.


:::moniker-end

:::moniker range="<=azure-pipelines"

frameworkOption - Test framework
Input alias: framework. string. Required when enablePrepare = true. Allowed values: appium, espresso, calabash, uitest (Xamarin UI Test), xcuitest. Default value: appium.


:::moniker-end

:::moniker range="<=azure-pipelines"

appiumBuildDirectory - Build directory
Input alias: appiumBuildDir. string. Required when enablePrepare = true && framework = appium.

The path to the directory with the Appium tests.


:::moniker-end

:::moniker range="<=azure-pipelines"

espressoBuildDirectory - Build directory
Input alias: espressoBuildDir. string. Optional. Use when enablePrepare = true && framework = espresso.

The path to the Espresso output directory.


:::moniker-end

:::moniker range="<=azure-pipelines"

espressoTestApkFile - Test APK path
Input alias: espressoTestApkPath. string. Optional. Use when enablePrepare = true && framework = espresso.

The path to the APK file with the Espresso tests. If not set, build-dir is used to discover it. A wildcard is allowed.


:::moniker-end

:::moniker range="<=azure-pipelines"

calabashProjectDirectory - Project directory
Input alias: calabashProjectDir. string. Required when enablePrepare = true && framework = calabash.

The path to the Calabash workspace directory.


:::moniker-end

:::moniker range="<=azure-pipelines"

calabashConfigFile - Cucumber config file
string. Optional. Use when enablePrepare = true && framework = calabash.

The path to the Cucumber configuration file, usually cucumber.yml.


:::moniker-end

:::moniker range="<=azure-pipelines"

calabashProfile - Profile to run
string. Optional. Use when enablePrepare = true && framework = calabash.

The profile to run. This value must exist in the Cucumber configuration file.


:::moniker-end

:::moniker range="<=azure-pipelines"

calabashSkipConfigCheck - Skip Configuration Check
boolean. Optional. Use when enablePrepare = true && framework = calabash. Default value: false.

When set to true, this input skips the configuration check specified by the Cucumber profile.


:::moniker-end

:::moniker range="<=azure-pipelines"

uiTestBuildDirectory - Build directory
Input alias: uitestBuildDir. string. Required when enablePrepare = true && framework = uitest.

The path to the directory with the built test assemblies.


:::moniker-end

:::moniker range=">=azure-pipelines-2019.1"

uitestStorePath - Store file
string. Optional. Use when enablePrepare = true && framework = uitest.

The path to the store file that is used to sign the app.


:::moniker-end

:::moniker range="<=azure-pipelines"

uiTestStorePassword - Store password
Input alias: uitestStorePass. string. Optional. Use when enablePrepare = true && framework = uitest.

The password of the store file that is used to sign the app. To encrypt this value, use a new variable with its lock enabled on the Variables tab.


:::moniker-end

:::moniker range="<=azure-pipelines"

uitestKeyAlias - Key alias
string. Optional. Use when enablePrepare = true && framework = uitest.

Specifies the alias that identifies the public/private key pair that is used in the store file.


:::moniker-end

:::moniker range="<=azure-pipelines"

uiTestKeyPassword - Key password
Input alias: uitestKeyPass. string. Optional. Use when enablePrepare = true && framework = uitest.

Specifies the key password for the alias and store file. To encrypt this value, use a new variable with its lock enabled on the Variables tab.


:::moniker-end

:::moniker range="<=azure-pipelines"

uiTestToolsDirectory - Test tools directory
Input alias: uitestToolsDir. string. Optional. Use when enablePrepare = true && framework = uitest.

The path to the directory with the Xamarin UI test tools that contain test-cloud.exe.


:::moniker-end

:::moniker range="<=azure-pipelines"

signInfo - Signing information
string. Optional. Use when framework = calabash || framework = uitest.

Signs the test server.


:::moniker-end

:::moniker range="<=azure-pipelines"

xcUITestBuildDirectory - Build directory
Input alias: xcuitestBuildDir. string. Optional. Use when enablePrepare = true && framework = xcuitest.

The path to the build output directory (usually $(ProjectDir)/Build/Products/Debug-iphoneos).


:::moniker-end

:::moniker range="<=azure-pipelines"

xcUITestIpaFile - Test IPA path
Input alias: xcuitestTestIpaPath. string. Optional. Use when enablePrepare = true && framework = xcuitest.

The path to the .ipa file with the XCUITest tests.


:::moniker-end

:::moniker range="<=azure-pipelines"

prepareOptions - Additional options
Input alias: prepareOpts. string. Optional. Use when enablePrepare = true.

The additional arguments that are passed to the App Center test prepare step.


:::moniker-end

:::moniker range="<=azure-pipelines"

runTests - Run tests
Input alias: enableRun. boolean. Default value: true.

Runs the tests.


:::moniker-end

:::moniker range=">=azure-pipelines-2019"

credentialsOption - Authentication method
Input alias: credsType. string. Required when enableRun = true. Allowed values: serviceEndpoint (App Center service connection), inputs (Credentials). Default value: serviceEndpoint.

Uses the App Center service connection or enters the credentials to connect to Visual Studio App Center.


:::moniker-end

:::moniker range=">=azure-pipelines-2019"

serverEndpoint - App Center service connection
string. Required when enableRun = true && credsType = serviceEndpoint.

Selects the service connection for Visual Studio App Center. If needed, click the Manage link to create a new service connection.


:::moniker-end

:::moniker range="<=azure-pipelines"

username - App Center username
string. Required when enableRun = true && credsType = inputs.

Create your username by visiting the App Center sign in page, and provide the value here.


:::moniker-end

:::moniker range="<=azure-pipelines"

password - App Center password
string. Required when enableRun = true && credsType = inputs.

Set your password by visiting the App Center sign in page, and provide the value here. Variables defined in build or release pipelines as $(passwordVariable) are accepted. You may mark the variable type as secret to secure it.


:::moniker-end

:::moniker range="<=azure-pipelines"

appSlug - App slug
string. Required when enableRun = true.

The app slug is in the format of <username>/<app_identifier>. To locate the <username> and <app_identifier> for an app, click its name from Visual Studio App Center. The resulting URL is in the format https://appcenter.ms/users/<username>/apps/<app_identifier>.


:::moniker-end

:::moniker range="<=azure-pipelines"

devices - Devices
string. Required when enableRun = true.

Identifies the devices this test will run against. Copy and paste this string when you define a new test run from the Visual Studio App Center Test beacon.


:::moniker-end

:::moniker range="<=azure-pipelines"

series - Test series
string. Optional. Use when enableRun = true. Default value: master.

The series name for organizing the test runs (for example: master, production, beta).


:::moniker-end

:::moniker range="<=azure-pipelines"

dsymDirectory - dSYM directory
Input alias: dsymDir. string. Optional. Use when enableRun = true.

The path to the iOS symbol files.


:::moniker-end

:::moniker range="<=azure-pipelines"

localeOption - System language
Input alias: locale. string. Required when enableRun = true. Allowed values: da_DK (Danish (Denmark)), nl_NL (Dutch (Netherlands)), en_GB (English (United Kingdom)), en_US (English (United States)), fr_FR (French (France)), de_DE (German (Germany)), ja_JP (Japanese (Japan)), ru_RU (Russian (Russia)), es_MX (Spanish (Mexico)), es_ES (Spanish (Spain)), user (Other). Default value: en_US.

Utilize if your language isn't displayed. Select Other and enter its locale, such as en_US.


:::moniker-end

:::moniker range="<=azure-pipelines"

userDefinedLocale - Other locale
string. Optional. Use when enableRun = true && locale = user.

Enters any two-letter ISO-639 language code along with any two-letter ISO 3166 country code in the format <language>_<country>, such as en_US.


:::moniker-end

:::moniker range="<=azure-pipelines"

loginOptions - Additional options for login
Input alias: loginOpts. string. Optional. Use when enableRun = true && credsType = inputs.

The additional arguments that are passed to the Visual Studio App Center login step.


:::moniker-end

:::moniker range="<=azure-pipelines"

runOptions - Additional options for run
Input alias: runOpts. string. Optional. Use when enableRun = true.

The additional arguments that are passed to the Visual Studio App Center test run.


:::moniker-end

:::moniker range="<=azure-pipelines"

skipWaitingForResults - Do not wait for test result
Input alias: async. boolean. Optional. Use when enableRun = true. Default value: false.

Executes a command asynchronously and exits when the tests are uploaded without waiting for the test results.


:::moniker-end

:::moniker range="<=azure-pipelines"

cliFile - App Center CLI location
Input alias: cliLocationOverride. string.

The path to the Visual Studio App Center CLI on the build or release agent.


:::moniker-end

:::moniker range="<=azure-pipelines"

showDebugOutput - Enable debug output
Input alias: debug. boolean. Default value: false.

Adds --debug to the Visual Studio App Center CLI.


:::moniker-end

:::moniker range="=azure-pipelines-2019"

uitestStoreFile - Store file
string. Optional. Use when enablePrepare = true && framework = uitest.


:::moniker-end

Task control options

All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.

Output variables

:::moniker range="<=azure-pipelines"

None.

:::moniker-end

Remarks

This task lets you run test suites against an application binary (.apk or .ipa file) using App Center Test.

Examples

This example runs Espresso tests on an Android app using the App Center Test task.

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

Requirements

:::moniker range=">=azure-pipelines-2022.2"

Requirement Description
Pipeline types YAML, Classic build
Runs on Agent, DeploymentGroup
Demands None
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version 2.206.1 or greater
Task category Test

:::moniker-end

:::moniker range="=azure-pipelines-2022.1"

Requirement Description
Pipeline types YAML, Classic build
Runs on Agent, DeploymentGroup
Demands None
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version 2.144.0 or greater
Task category Test

:::moniker-end

:::moniker range="<=azure-pipelines-2022"

Requirement Description
Pipeline types YAML, Classic build
Runs on Agent, DeploymentGroup
Demands None
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version All supported agent versions.
Task category Test

:::moniker-end