Execute an automated test for an iOS Xamarin app
iOS
Xamarin app- InVisual Studio, openiOS.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.iOS.UITests/Container/ContainerBootstrapper.cs.PropertyValueBinaryPathThis is the path of the .ipa or .app file.DeviceIdentifierThis is the device identifier.To get the identifier (UDID) for aniOSdevice, run the following command in the terminal:$ cfgutil list-devicesTo get the simulator device identifier (UUID), run the following command in the terminal:$ xcrun simctl listDeviceEcidTo get the ECID for aniOSdevice, run the following command in the terminal:$ cfgutil list-devicesIf you are using aniOSsimulator, specify an empty string.AdbPathThis property applies only toAndroiddevices. ForiOS, specify an empty string.EmailThis is the test user’s email address.AccessKeyThe 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 for aniOSapp{ "BinaryPath": "/userDownloads/com.good.gd.example.xf.blankapp.ipa", "DeviceIdentifier": "12a12a12a123abcd12a123456ab1a12ab1ab123a", "DeviceEcid": "0x12345678A123A", "AdbPath": "" //For Android only "Email": "user@acme.com", "AccessKey": "01234 56789 01234", "NocAddress": "stage11", "Password": "abcd", "ConfirmPassword": "abcd" }Example for aniOSsimulator{ "BinaryPath": "/userDownloads/com.good.gd.example.xf.blankapp.app", "DeviceIdentifier": "AB123A12-1234-1ABC-ABCD-12A12A12A1AB", "DeviceEcid": "", //For iOS only, not required for iOS simulator "AdbPath": "" //For Android only "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 theiOSdevice or open the simulator with the device identifier that you specified in step 2.
- If you are using aniOSsimulator, turn off the hardware keyboard.
- Run the test.