Execute an automated test for an Android Xamarin app
Android
Xamarin app- InVisual Studio, openAndroid.UITests.
- Configure the following properties for the data provider class. If you use the default FileDataProvider class, configure the properties in Common.UITests/Resources/data.json. If you use the SimpleDataProvider class, configure the properties in Common.UITests/DataServices/BaseSimpleDataProvider.cs.You can change the data provider class in the IDataProvider interface in Common.Android.UITests/Container/ContainerBootstrapper.cs.PropertyValueBinaryPathThis is the path of the .apk file.DeviceIdentifierThis is the device identifier.To get the device identifier, run the following command in the terminal while the device is connected or the emulator is open:$ adb devicesDeviceEcidThis property applies only toiOSdevices. ForAndroid, specify an empty string.AdbPathThis is the path of theAndroidDebug Bridge (ADB) tool.To get the path, run the following command in the terminal:$ which adbEmailThis is the test user’s email address.AccessKeyThis is the user’s 17 character access key, in the format "xxxxx xxxxx xxxxx" or "xxxxx-xxxxx-xxxxx".You can generate an access key for the user using theUEMmanagement console or the BlackBerry Web Services APIs.NocAddressThis is the address of theBlackBerry DynamicsNOC. For example, “stage11” for the staging NOC and “prod1” for the production NOC.PasswordThis is the user’s password. The password must meet the password requirements configured in the user’sBlackBerry Dynamicspolicy.ConfirmPasswordThis is the user’s password. The password must meet the password requirements configured in the user’sBlackBerry Dynamicspolicy.Example{ "BinaryPath": "/userDownloads/com.good.gd.example.xf.blankapp.apk", "DeviceIdentifier": "123456a1a12ab1a1", "DeviceEcid": "", //For iOS only "AdbPath": "/user/Library/Android/sdk/platform-tools/adb", "Email": "user@acme.com", "AccessKey": "01234 56789 01234", "NocAddress": "stage11", "Password": "abcd", "ConfirmPassword": "abcd" }
- Configure the startup project for the test that you want to run.
- Connect theAndroiddevice or open theAndroidemulator with the device identifier that you specified in step 2.
- Run the test.