แชร์ผ่าน


AppCenterTest@1 - App Center test v1 task

Test app packages with Visual Studio App Center.

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 enablePrepare = true. Allowed values: appium, espresso, calabash, uitest (Xamarin UI Test), xcuitest. Default value: appium.


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

The path to the directory with the Appium tests.


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

The path to the Espresso output directory.


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.


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

The path to the Calabash workspace directory.


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

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


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.


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.


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

The path to the directory with the built test assemblies.


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.


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.


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.


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.


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

Signs the test server.


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


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.


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.


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

Runs the tests.


credentialsOption - Authentication method
Input alias: credsType. string. Required when enableRun = true. Allowed values: serviceEndpoint (App Center 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 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.


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.


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.


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


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.


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


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

The path to the iOS symbol files.


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.


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.


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.


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.


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.


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.


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


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 All supported agent versions.
Task category Test