The connection string specifies which mobile device is used for testing. When performing mobile testing, Silk Test Classic uses the connection string to connect to the mobile device. The connection string is typically part of the application configuration. You can set the connection string when you configure your application under test. To change the connection string, you can use the Edit Application Configuration dialog box.
The following components are available for the connection string:
Component | Description |
---|---|
deviceName | The name of the mobile device. When testing on a physical mobile device, the device ID can be used instead. Supports wildcards. Case-insensitive. |
platformName | Android or iOS. Required. |
deviceId | Optional: The ID of the mobile device. Can be used instead of the device name, when testing on a physical mobile device. Supports wildcards. Case-insensitive. |
platformVersion | Optional: The Android or iOS version. Specify the version to test only on mobile devices that have a specific Android or iOS version. Supports wildcards. Case-insensitive. |
browserVersion | Optional: Can be used in combination with the browser type to test only on the specified browser version. Supports wildcards. Case-insensitive. |
host | Optional: If not set, any specified remote location can be used as the host. Supports wildcards. Case-insensitive. |
app | The full path to an app that is not installed on the mobile device yet. For example app=MyApp.apk. |
|
To test an app that is already installed on an Android device, specify both the package of the app and the activity that you want to use. For example appPackage=silktest.insurancemobile;appActivity=.LoginActivity . |
bundleId | The identifier of the bundle of an app that is already installed on an iOS device. For example app=MyApp.ipa or bundleId=silktest.InsuranceMobile. |
mobileCenterAppIdentifier | The identifier of an app that is already installed on a mobile device that is managed by UFT Mobile. For example mobileCenterAppIdentifier=com.microfocus.silktest.testapp. |
mobileCenterAppUploadNumber | The upload number of an app that is already installed on a mobile device that is managed by UFT Mobile. Can be used to identify the application uniquely when the application is uploaded more than once. If this number is not specified, Silk Test Classic uses the latest upload. For example mobileCenterAppUploadNumber=3. |
noReset | Optional: Can be set when testing native mobile applications. Is only valid if the app is specified. True if the app should not be reinstalled before testing. False if the app should be reinstalled before testing. The default value is False. |
isSimulator | Optional: Used to specify that the test should only be executed on an iOS Simulator. The device name can be used instead. |
isPhysicalDevice | Optional: Used to specify that the test should only be executed on a physical device. The device name can be used instead. |
excludedDeviceIds | Optional: A comma separated list of device IDs that should not be used for testing. |
When using a pool of devices and to find out which device is actually used for testing, you can use the return value of the GenerateConnectionString method of MobileDevice class.
When testing a mobile web application on a mobile device or on an Android Emulator, the connection string consists of the following parts:
"platformName=Android"
"deviceName=MotoG3;platformName=Android;host=localhost"or
"platformName=Android;deviceId=11111111;host=localhost"
"deviceName=MotoG3;platformName=Android;host=10.0.0.1"
"deviceName=MotoG3;platformName=Android;host=MyRemoteLocation*"
"deviceName=MotoG3;platformName=Android;host=http://<UFT Mobile server>:8080;hostType=MC;userName=<UFT Mobile user name>;password=<UFT Mobile password>"
"deviceName=myiPhone6;platformName=iOS;host=10.0.0.1"
"platformName=Android;deviceName=MotoG3;host=http://10.0.0.1;app=MyApp.apk"
"platformName=iOS;deviceName=MyiPhone;host=http://10.0.0.1;app=MyApp.ipa"
"platformName=iOS;platformVersion=10.0;deviceName=iPhone6;host=10.0.0.1;isSimulator=true"
"platformName=iOS;platformVersion=10.0;deviceName=iPhone6;host=10.0.0.1;app=MyApp.ipa;isSimulator=true"