Notitie
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen u aan te melden of de directory te wijzigen.
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen de mappen te wijzigen.
App-pakketten testen met Visual Studio App Center.
Syntaxis
# 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.
Invoer
appFile
-
bestandspad voor binaire toepassingen
Invoeralias: app.
string. Verplicht.
Het relatieve pad van de hoofdmap van de opslagplaats naar het APK- of IPA-bestand dat u wilt testen.
map artifactsDirectory - Artefacten
Invoeralias: artifactsDir.
string. Verplicht. Standaardwaarde: $(Build.ArtifactStagingDirectory)/AppCenterTest.
Hiermee geeft u op waar de artefacten die zijn geproduceerd door de voorbereidingsstap en die door de uitvoeringsstap worden gebruikt. Deze map wordt gemaakt als deze nog niet bestaat.
prepareTests
-
tests voorbereiden
Invoeralias: enablePrepare.
boolean. Standaardwaarde: true.
Als deze optie is ingesteld op true, worden de tests door deze invoer voorbereid.
frameworkOption
-
testframework
Invoeralias: framework.
string. Vereist wanneer prepareTests = true. Toegestane waarden: appium, espresso, calabash, uitest (Xamarin UI Test), xcuitest. Standaardwaarde: appium.
appiumBuildDirectory
-
map maken
Invoeralias: appiumBuildDir.
string. Vereist wanneer prepareTests = true && frameworkOption = appium.
Het pad naar de map met de Appium-tests.
espressoBuildDirectory
-
map maken
Invoeralias: espressoBuildDir.
string. Facultatief. Gebruiken wanneer prepareTests = true && frameworkOption = espresso.
Het pad naar de espresso-uitvoermap.
espressoTestApkFile
-
APK-pad testen
Invoeralias: espressoTestApkPath.
string. Facultatief. Gebruiken wanneer prepareTests = true && frameworkOption = espresso.
Het pad naar het APK-bestand met de Espresso-tests. Als deze niet is ingesteld, wordt build-dir gebruikt om deze te detecteren. Een jokerteken is toegestaan.
calabashProjectDirectory
-
projectmap
Invoeralias: calabashProjectDir.
string. Vereist wanneer prepareTests = true && frameworkOption = calabash.
Het pad naar de map van de Calabash-werkruimte.
calabashConfigFile
-
komkommerconfiguratiebestand
string. Facultatief. Gebruiken wanneer prepareTests = true && frameworkOption = calabash.
Het pad naar het komkommerconfiguratiebestand, meestal cucumber.yml.
calabashProfile
-
profiel om uit te voeren
string. Facultatief. Gebruiken wanneer prepareTests = true && frameworkOption = calabash.
Het profiel dat moet worden uitgevoerd. Deze waarde moet bestaan in het configuratiebestand Komkommer.
calabashSkipConfigCheck
-
Configuratiecontrole overslaan
boolean. Facultatief. Gebruiken wanneer prepareTests = true && frameworkOption = calabash. Standaardwaarde: false.
Als deze optie is ingesteld op true, slaat deze invoer de configuratiecontrole over die is opgegeven door het komkommerprofiel.
uiTestBuildDirectory
-
map maken
Invoeralias: uitestBuildDir.
string. Vereist wanneer prepareTests = true && frameworkOption = uitest.
Het pad naar de map met de ingebouwde testassembly's.
uitestStorePath
-
opslaan
string. Facultatief. Gebruiken wanneer prepareTests = true && frameworkOption = uitest.
Het pad naar het store-bestand dat wordt gebruikt om de app te ondertekenen.
uiTestStorePassword
-
Wachtwoord opslaan
Invoeralias: uitestStorePass.
string. Facultatief. Gebruiken wanneer prepareTests = true && frameworkOption = uitest.
Het wachtwoord van het store-bestand dat wordt gebruikt om de app te ondertekenen. Als u deze waarde wilt versleutelen, gebruikt u een nieuwe variabele met de vergrendeling ingeschakeld op het tabblad Variabelen.
uitestKeyAlias
-
sleutelalias
string. Facultatief. Gebruiken wanneer prepareTests = true && frameworkOption = uitest.
Hiermee geeft u de alias die het openbare/persoonlijke sleutelpaar identificeert dat wordt gebruikt in het archiefbestand.
uiTestKeyPassword
-
sleutelwachtwoord
Invoeralias: uitestKeyPass.
string. Facultatief. Gebruiken wanneer prepareTests = true && frameworkOption = uitest.
Hiermee geeft u het sleutelwachtwoord voor de alias en het archiefbestand. Als u deze waarde wilt versleutelen, gebruikt u een nieuwe variabele met de vergrendeling ingeschakeld op het tabblad Variabelen.
MapuiTestToolsDirectory - Hulpprogramma's testen
Invoeralias: uitestToolsDir.
string. Facultatief. Gebruiken wanneer prepareTests = true && frameworkOption = uitest.
Het pad naar de map met de Xamarin UI-testhulpprogramma's die test-cloud.exebevatten.
signInfo
-
ondertekeningsgegevens
string. Facultatief. Gebruiken wanneer frameworkOption = calabash || frameworkOption = uitest.
Ondertekent de testserver.
xcUITestBuildDirectory
-
map maken
Invoeralias: xcuitestBuildDir.
string. Facultatief. Gebruiken wanneer prepareTests = true && frameworkOption = xcuitest.
Het pad naar de uitvoermap van de build (meestal $(ProjectDir)/Build/Products/Debug-iphoneos).
xcUITestIpaFile
-
IPA-pad testen
Invoeralias: xcuitestTestIpaPath.
string. Facultatief. Gebruiken wanneer prepareTests = true && frameworkOption = xcuitest.
Het pad naar het IPA-bestand met de XCUITest-tests.
prepareOptions
-
Aanvullende opties
Invoeralias: prepareOpts.
string. Facultatief. Gebruiken wanneer prepareTests = true.
De aanvullende argumenten die worden doorgegeven aan de teststap van App Center.
runTests
-
tests uitvoeren
Invoeralias: enableRun.
boolean. Standaardwaarde: true.
Voert de tests uit.
credentialsOption
-
verificatiemethode
Invoeralias: credsType.
string. Vereist wanneer runTests = true. Toegestane waarden: serviceEndpoint (App Center-serviceverbinding), inputs (referenties). Standaardwaarde: serviceEndpoint.
Maakt gebruik van de App Center-serviceverbinding of voert de referenties in om verbinding te maken met Visual Studio App Center.
serverEndpoint
-
App Center-serviceverbinding
string. Vereist wanneer runTests = true && credentialsOption = serviceEndpoint.
Selecteert de serviceverbinding voor Visual Studio App Center. Klik indien nodig op de koppeling Beheren om een nieuwe serviceverbinding te maken.
username
-
App Center-gebruikersnaam
string. Vereist wanneer runTests = true && credentialsOption = inputs.
Maak uw gebruikersnaam door naar de aanmeldingspagina van App Center te gaanen geef hier de waarde op.
password
-
App Center-wachtwoord
string. Vereist wanneer runTests = true && credentialsOption = inputs.
Stel uw wachtwoord in door naar de aanmeldingspagina van App Center te gaanen geef hier de waarde op. Variabelen die zijn gedefinieerd in build- of release-pijplijnen als $(passwordVariable) worden geaccepteerd. U kunt het variabeletype markeren als secret om het te beveiligen.
appSlug
-
app-slug
string. Vereist wanneer runTests = true.
De app-slug heeft de indeling van <username>/<app_identifier>. Als u de <username> en <app_identifier> voor een app wilt zoeken, klikt u op de naam van Visual Studio App Center-. De resulterende URL heeft de indeling https://appcenter.ms/users/<username>/apps/<app_identifier>.
devices
-
apparaten
string. Vereist wanneer runTests = true.
Identificeert de apparaten waarop deze test wordt uitgevoerd. Kopieer en plak deze tekenreeks wanneer u een nieuwe testuitvoering definieert vanuit de Visual Studio App Center Test-baken.
series
-
testreeks
string. Facultatief. Gebruiken wanneer runTests = true. Standaardwaarde: master.
De naam van de reeks voor het ordenen van de testuitvoeringen (bijvoorbeeld: master, productie, bèta).
dsymDirectory
-
dSYM-map
Invoeralias: dsymDir.
string. Facultatief. Gebruiken wanneer runTests = true.
Het pad naar de iOS-symboolbestanden.
localeOption
-
systeemtaal
Invoeralias: locale.
string. Vereist wanneer runTests = true. Toegestane waarden: da_DK (Deens (Denemarken)), nl_NL (Nederlands (Nederland)), en_GB (Engels (Verenigd Koninkrijk)), en_US (Engels (Verenigde Staten)), fr_FR (Frans (Frankrijk)), fr_FR (Frankrijk)), ja_JPfr_FR (Duits (Duitsland)), es_MX (Japans (Japan)), es_ES (Russisch (Rusland)), user (Spaans (Mexico)), (Spaans (Spanje)), (overige). Standaardwaarde: en_US.
Gebruik deze optie als uw taal niet wordt weergegeven. Selecteer Other en voer de landinstelling in, zoals en_US.
userDefinedLocale
-
andere landinstellingen
string. Facultatief. Gebruiken wanneer runTests = true && localeOption = user.
Voert elke ISO-639-taalcode van twee letters in, samen met een ISO 3166-landcode van twee letters in de notatie <language>_<country>, zoals en_US.
loginOptions
-
Aanvullende opties voor aanmelden
Invoeralias: loginOpts.
string. Facultatief. Gebruiken wanneer runTests = true && credentialsOption = inputs.
De aanvullende argumenten die worden doorgegeven aan de aanmeldingsstap van Visual Studio App Center.
runOptions
-
Aanvullende opties voor het uitvoeren van
Invoeralias: runOpts.
string. Facultatief. Gebruiken wanneer runTests = true.
De extra argumenten die worden doorgegeven aan de testuitvoering van Visual Studio App Center.
skipWaitingForResults
-
Wacht niet op testresultaten
Invoeralias: async.
boolean. Facultatief. Gebruiken wanneer runTests = true. Standaardwaarde: false.
Hiermee wordt een opdracht asynchroon uitgevoerd en wordt afgesloten wanneer de tests worden geüpload zonder te wachten op de testresultaten.
cliFile
-
Cli-locatie van App Center
Invoeralias: cliLocationOverride.
string.
Het pad naar de Visual Studio App Center CLI op de build- of releaseagent.
showDebugOutput
-
Foutopsporingsuitvoer inschakelen
Invoeralias: debug.
boolean. Standaardwaarde: false.
Voegt --debug toe aan de Visual Studio App Center CLI.
Opties voor taakbeheer
Alle taken hebben besturingsopties naast hun taakinvoer. Zie Opties en algemene taakeigenschappenvoor meer informatie.
Uitvoervariabelen
Geen.
Opmerkingen
Met deze taak kunt u testsuites uitvoeren op basis van een binaire toepassing (.apk of .ipa-bestand) met behulp van App Center Test.
- meld u eerst aan bij App Center.
- Zie het documentatieartikel over App Center Azure DevOps gebruiken voor het testen van gebruikersinterfacesvoor meer informatie over het gebruik van deze taak.
Voorbeelden
In dit voorbeeld worden Espresso-tests uitgevoerd op een Android-app met behulp van de App Center-testtaak.
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
Vereisten
| Voorwaarde | Beschrijving |
|---|---|
| Pijplijntypen | YAML, klassieke build |
| Wordt uitgevoerd op | Agent, DeploymentGroup |
| eisen | Geen |
| mogelijkheden | Deze taak voldoet niet aan de vereisten voor volgende taken in de taak. |
| opdrachtbeperkingen | Welk dan ook |
| variabelen instellen | Welk dan ook |
| Agentversie | 2.206.1 of hoger |
| Taakcategorie | Testen |
| Voorwaarde | Beschrijving |
|---|---|
| Pijplijntypen | YAML, klassieke build |
| Wordt uitgevoerd op | Agent, DeploymentGroup |
| eisen | Geen |
| mogelijkheden | Deze taak voldoet niet aan de vereisten voor volgende taken in de taak. |
| opdrachtbeperkingen | Welk dan ook |
| variabelen instellen | Welk dan ook |
| Agentversie | 2.144.0 of hoger |
| Taakcategorie | Testen |
| Voorwaarde | Beschrijving |
|---|---|
| Pijplijntypen | YAML, klassieke build |
| Wordt uitgevoerd op | Agent, DeploymentGroup |
| eisen | Geen |
| mogelijkheden | Deze taak voldoet niet aan de vereisten voor volgende taken in de taak. |
| opdrachtbeperkingen | Welk dan ook |
| variabelen instellen | Welk dan ook |
| Agentversie | Alle ondersteunde agentversies. |
| Taakcategorie | Testen |