Edit

AppCenterTest@1 - App Center test v1 task

Test app packages with Visual Studio App Center.

Syntax

# 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 prepareTests = true. Test framework. Default: appium.
    #appiumBuildDirectory: # string. Alias: appiumBuildDir. Required when prepareTests = true && frameworkOption = appium. Build directory. 
    #espressoBuildDirectory: # string. Alias: espressoBuildDir. Optional. Use when prepareTests = true && frameworkOption = espresso. Build directory. 
    #espressoTestApkFile: # string. Alias: espressoTestApkPath. Optional. Use when prepareTests = true && frameworkOption = espresso. Test APK path. 
    #calabashProjectDirectory: # string. Alias: calabashProjectDir. Required when prepareTests = true && frameworkOption = calabash. Project directory. 
    #calabashConfigFile: # string. Optional. Use when prepareTests = true && frameworkOption = calabash. Cucumber config file. 
    #calabashProfile: # string. Optional. Use when prepareTests = true && frameworkOption = calabash. Profile to run. 
    #calabashSkipConfigCheck: false # boolean. Optional. Use when prepareTests = true && frameworkOption = calabash. Skip Configuration Check. Default: false.
    #uiTestBuildDirectory: # string. Alias: uitestBuildDir. Required when prepareTests = true && frameworkOption = uitest. Build directory. 
    #uitestStorePath: # string. Optional. Use when prepareTests = true && frameworkOption = uitest. Store file. 
    #uiTestStorePassword: # string. Alias: uitestStorePass. Optional. Use when prepareTests = true && frameworkOption = uitest. Store password. 
    #uitestKeyAlias: # string. Optional. Use when prepareTests = true && frameworkOption = uitest. Key alias. 
    #uiTestKeyPassword: # string. Alias: uitestKeyPass. Optional. Use when prepareTests = true && frameworkOption = uitest. Key password. 
    #uiTestToolsDirectory: # string. Alias: uitestToolsDir. Optional. Use when prepareTests = true && frameworkOption = uitest. Test tools directory. 
    #signInfo: # string. Optional. Use when frameworkOption = calabash || frameworkOption = uitest. Signing information. 
    #xcUITestBuildDirectory: # string. Alias: xcuitestBuildDir. Optional. Use when prepareTests = true && frameworkOption = xcuitest. Build directory. 
    #xcUITestIpaFile: # string. Alias: xcuitestTestIpaPath. Optional. Use when prepareTests = true && frameworkOption = xcuitest. Test IPA path. 
    #prepareOptions: # string. Alias: prepareOpts. Optional. Use when prepareTests = true. Additional options. 
  # Run Tests
    #runTests: true # boolean. Alias: enableRun. Run tests. Default: true.
    credentialsOption: 'serviceEndpoint' # 'serviceEndpoint' | 'inputs'. Alias: credsType. Required when runTests = true. Authentication method. Default: serviceEndpoint.
    #serverEndpoint: # string. Required when runTests = true && credentialsOption = serviceEndpoint. App Center service connection. 
    #username: # string. Required when runTests = true && credentialsOption = inputs. App Center username. 
    #password: # string. Required when runTests = true && credentialsOption = inputs. App Center password. 
    appSlug: # string. Required when runTests = true. App slug. 
    devices: # string. Required when runTests = true. Devices. 
    #series: 'master' # string. Optional. Use when runTests = true. Test series. Default: master.
    #dsymDirectory: # string. Alias: dsymDir. Optional. Use when runTests = 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 runTests = true. System language. Default: en_US.
    #userDefinedLocale: # string. Optional. Use when runTests = true && localeOption = user. Other locale. 
    #loginOptions: # string. Alias: loginOpts. Optional. Use when runTests = true && credentialsOption = inputs. Additional options for login. 
    #runOptions: # string. Alias: runOpts. Optional. Use when runTests = true. Additional options for run. 
    #skipWaitingForResults: false # boolean. Alias: async. Optional. Use when runTests = 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.

Inputs

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.


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.


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

When set to true, this input prepares the tests.


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


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

The path to the directory with the Appium tests.


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

The path to the Espresso output directory.


espressoTestApkFile - Test APK path
Input alias: espressoTestApkPath. string. Optional. Use when prepareTests = true && frameworkOption = 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.


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

The path to the Calabash workspace directory.


calabashConfigFile - Cucumber config file
string. Optional. Use when prepareTests = true && frameworkOption = calabash.

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


calabashProfile - Profile to run
string. Optional. Use when prepareTests = true && frameworkOption = calabash.

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


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

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


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

The path to the directory with the built test assemblies.


uitestStorePath - Store file
string. Optional. Use when prepareTests = true && frameworkOption = uitest.

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


uiTestStorePassword - Store password
Input alias: uitestStorePass. string. Optional. Use when prepareTests = true && frameworkOption = 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.


uitestKeyAlias - Key alias
string. Optional. Use when prepareTests = true && frameworkOption = uitest.

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


uiTestKeyPassword - Key password
Input alias: uitestKeyPass. string. Optional. Use when prepareTests = true && frameworkOption = 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.


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

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


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

Signs the test server.


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

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


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

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


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

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


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

Runs the tests.


credentialsOption - Authentication method
Input alias: credsType. string. Required when runTests = 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.


serverEndpoint - App Center service connection
string. Required when runTests = true && credentialsOption = serviceEndpoint.

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


username - App Center username
string. Required when runTests = true && credentialsOption = inputs.

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


password - App Center password
string. Required when runTests = true && credentialsOption = 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.


appSlug - App slug
string. Required when runTests = 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>.


devices - Devices
string. Required when runTests = 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.


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

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


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

The path to the iOS symbol files.


localeOption - System language
Input alias: locale. string. Required when runTests = 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.


userDefinedLocale - Other locale
string. Optional. Use when runTests = true && localeOption = 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.


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

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


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

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


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

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


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

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


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

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


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

None.

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

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