Scan mobile applications in the cloud

Tosca is cloud-agnostic. With the Mobile Scan, you can scan your mobile applications in any cloud.

To use an online cloud, make sure you select Remote as the connection type and configure the Desired Capabilities.

The following are examples of few online clouds that you can use:

Enable or disable the control visibility check

By default, Mobile Engine 3.0 checks controls visibility for local test automation and it skips the visibility check for test automation in the supported clouds.

You can enable or disable the visibility check depending on your mobile application and performance requirements.

Tricentis recommends disabling the visibility check if you run your tests in the clouds that are not supported.

To enable or disable the visibility check only for test execution, create the TCP SkipVisibilityCheck and set its value to True or False depending on whether you want to skip the visibility check or not.

To enable or disable the visibility check for both the Mobile Scan and test execution, follow the steps below:

  1. Go to C:\ProgramData\TRICENTIS\TOSCA Testsuite\7.0.0\Settings\XML and open the file Settings.xml.

  2. Under <Category name="Mobile30">, add the following line of code before the closing tag:

    <Setting name="Automation.Mobile30.SkipVisibilityCheck" legacyPath="Automation.Mobile30.SkipVisibilityCheck">False</Setting>

  3. Set the value of this setting to True or False depending on whether you want to skip the visibility check or not.

  4. Restart Tricentis Tosca.

Improve Mobile Scan performance

If you scan mobile applications in the clouds, Tricentis recommends to change the scanning mechanism to improve performance. This way, the Mobile Scan doesn't send multiple calls to the Appium server each time you select a new control.

To enable this setting, follow the steps below:

  1. Go to C:\ProgramData\TRICENTIS\TOSCA Testsuite\7.0.0\Settings\XML and open the Settings.xml file.

  2. Under <Category name=”Engines”>, add the following line of code before the closing tag:

    <Setting name="Automation.Engines.SingleUniqueChecks" legacyPath="Automation.Engines.SingleUniqueChecks">True</Setting>

  3. Save and close the file.

  4. Restart Tricentis Tosca.

Scan mobile applications in BrowserStack

You can scan native, web, and hybrid applications with the Mobile Scan in BrowserStack.

To scan an application in BrowserStack, follow the steps below:

  1. If you test a native or hybrid app, upload it to your BrowserStack account. To do so, click on UPLOAD APP in the menu. Once your application is uploaded, BrowserStack displays a unique identifier that you need for test configuration.

Unique identifier for an app in BrowserStack

  1. Start the Mobile Scan.

  2. In the Mobile Scan window, click Add device.

  3. In the Add device window, click Add new.

  4. In the Add connection window, enter the information described in the table below.

Label

Description

Enter a name for your connection

Enter a custom name for your BrowserStack connection.

The Mobile Engine 3.0 uses this name as a mobile configuration name under the node Mobile->Connections.

Choose the type of your connection

Select Remote.

Enter the Appium Server address

Enter the Appium Server for your BrowserStack account.

It consists of the following elements:

  • Your User Name, followed by a colon (:)

  • Your Access Key

  • @hub-cloud.browserstack.com/wd/hub

For example: https://<Your User Name>:<Your Access Key>@hub-cloud.browserstack.com/wd/hub

Your User Name and Access Key are available in your BrowserStack, under ACCESS KEY in the menu.

  1. Click Add.

  1. In the Add device window, enter the information described in the table below.

Label

Description

Choose a connection

Select the BrowserStack connection that you created in steps 5 and 6.

Enter a name for your device

Enter a custom name for your BrowserStack device.

The Mobile Engine 3.0 uses this name as a mobile configuration name under the node Mobile->Connections.

Enter the device ID

Enter the name of your BrowserStack device, for example: Samsung Galaxy S9.

Enter the device platform version

This parameter is optional.

You can enter the platform version of your BrowserStack device. The Mobile Engine 3.0 saves it in the mobile configurations and you can later use it as an OSVersion TCP.

iOS

Android

Select the platform of your device.

For iOS, select Simulated or Real.

  1. In the Mobile Scan, click on Add app and provide the details of your application.

    • For native and hybrid iOS applications, enter the Bundle ID.

    • For native and hybrid Android applications, enter the PackageName and Activity.

    • For a web application, enter the URL address.

  1. In the Advanced configuration, configure and add the following Desired Capabilities:

    • browserstack.user with the value of your BrowserStack account.

    • browserstack.key with the unique key of your BrowserStack account.

    • app_url with the path to an application that you store on your BrowserStack account. For example, bs://jioqw82hedidw. You don't need this Desired Capability, if you configure a mobile web application.

    • device with the device name of your BrowserStack device.

    • os_version with the version of the mobile operating system.

    • PlatformName with the value Android or iOS.

Advanced configuration of BrowserStack

  1. Click Connect and continue the scan as described in chapter "Select controls to steer".

Scan mobile applications in HeadSpin

You can scan native, web, and hybrid applications with the Mobile Scan in HeadSpin.

To scan an application in HeadSpin, follow the steps below:

  1. In HeadSpin, ensure that you have an API Token. To do so, go to Settings in your account. You can see your token in the API Tokens section. If there is no token, click on +New Token to create it.

  2. Start the Mobile Scan.

  3. In the Mobile Scan window, click Add device.

  4. In the Add device window, click Add new.

  5. In the Add connection window, enter the information described in the table below.

Label

Description

Enter a name for your connection

Enter a custom name for your HeadSpin connection.

The Mobile Engine 3.0 uses this name as a mobile configuration name under the node Mobile->Connections.

Choose the type of your connection

Select Remote.

Enter the Appium Server address

Enter the address of the Appium Server that is assigned to your device.

To get the address, follow the steps below:

  1. Go to the Remote Control tab.

  2. Click on More Actions for your device and select Automation Configuration.

  3. Under WEB DRIVER URL, click on the address to copy it to your clipboard.

  1. Click Add.

Add connection window with sample details for HeadSpin

  1. In the Add device window, enter the information described in the table below.

Label

Description

Choose a connection

Select the HeadSpin connection that you created in steps 5 and 6.

Enter a name for your device

Enter a custom name for your HeadSpin device.

The Mobile Engine 3.0 uses this name as a mobile configuration name under the node Mobile->Connections.

Enter the device ID

Enter the ID of your HeadSpin device.

You can find it in the Remote Control tab, in the Device ID column.

Enter the device platform version

This parameter is optional.

You can enter the platform version of your HeadSpin device. The Mobile Engine 3.0 saves it in the mobile configurations and you can later use it as an OSVersion TCP.

iOS

Android

Select the platform of your device.

For iOS, select Simulated or Real.

  1. In the Mobile Scan, click on Add app and provide the details of your application.

    • For native and hybrid iOS applications, enter the Bundle ID.

    • For native and hybrid Android applications, enter the PackageName and Activity.

    • For a web application, enter the URL address.

Add web application window with sample application details

  1. Optionally, configure the Desired Capabilities.

  2. Click Connect and continue the scan as described in chapter "Select controls to steer".

Scan mobile applications in Perfecto

You can scan native applications with the Mobile Scan in Perfecto.

Tricentis doesn't recommend to scan mobile web and hybrid applications in Perfecto with the Mobile Engine 3.0, because it might result in performance issues.

To scan an application in Perfecto, follow the steps below:

  1. Start the Mobile Scan.

  2. In the Mobile Scan window, click Add device.

  3. In the subsequent Add device window, click Add new.

  4. In the Add connection window, enter the information described below.

Label

Description

Enter a name for your connection

Enter a custom name for your Perfecto connection.

The Mobile Engine 3.0 uses this name as a mobile configuration name under the node Mobile->Connections.

Choose the type of your connection

Select Perfecto.

Enter the Appium Server address

Enter the address of the Perfecto Appium server. By default, this is https://<your host>.perfectomobile.com/nexperience/perfectomobile/wd/hub.

Replace <your host> with your own host.

Access Key

Enter the security token for your Perfecto account.

Add connection window with sample Perfecto account details

  1. Click Add.

  2. In the Add device window, click Cancel.

    Now you can load and filter the devices, emulators, and simulators that are available in Sauce Labs. To do so, select the check box Load cloud devices.

    Alternatively, in the Add device window, enter the details of your cloud device.

  1. In the Mobile Scan, click on Add app and provide the details for your application.

  2. Optionally, configure the Desired Capabilities.

  3. Click Connect and continue the scan as described in chapter "Select controls to steer".

Add a cloud device

If you don't want to use the Load cloud devices option, you can manually add a cloud device.

In the Add device window, enter the information described in the table below and click Add.

Label

Description

Enter a name for your device

Enter a custom name for your Perfecto device into the Enter a name for your device field.

The Mobile Engine 3.0 uses this name as a mobile configuration name under the node Mobile->Connections.

Enter the device ID

Enter your Perfecto Device ID, which you can find in your Perfecto account.

Example: R32423FRGT04TNBZ

Scan mobile applications in Sauce Labs

You can scan native, web, and hybrid applications with the Mobile Scan in Sauce Labs.

To scan an application in Sauce Labs, follow the steps below:

  1. Start the Mobile Scan.

  2. In the Mobile Scan window, click Add device.

  3. In the subsequent Add device window, click Add new.

  4. In the Add connection window, enter the information described in the table below.

Label

Description

Enter a name for your connection

Enter a custom name for your Sauce Labs connection.

The Mobile Engine 3.0 uses this name as a mobile configuration name under the node Mobile->Connections.

Choose the type of your connection

Select SauceLabs.

Enter the Appium Server address

Enter the address of the Sauce Labs Appium server.

For the endpoint located in Europe, use https://ondemand.eu-central-1.saucelabs.com/wd/hub.

For the endpoint located in the US, use https://ondemand.us-west-1.saucelabs.com/wd/hub.

To avoid high latency, Tricentis recommends that you use the endpoint which is geographically closer to you.

Login

Enter the user name of your Sauce Labs account.

You can find it under User Information->USER NAME in your Sauce Labs account settings.

Access Key

Enter the access key of your Sauce Labs account.

You can find the access key under Access Key in your Sauce Labs account settings.

Add connection window with sample Sauce Labs account details

  1. Click Add.

  2. In the Add device window, click Cancel.

    Now you can load and filter the devices, emulators, and simulators that are available in Sauce Labs. To do so, in the Mobile Scan window, select the check box Load cloud devices.

    Alternatively, in the Add device window, enter the details of your cloud device.

  1. In the Mobile Scan, click on Add app and provide the details of your application.

    For native applications on an iOS or Android device, Tricentis recommends to use the file name of your application preceded by storage:filename=. For example: storage:filename=InsuranceCalculator.apk.

    For native applications on an iOS simulator, use the path to the zip file. For example: storage:filename=InsuranceCalculator.app.zip.

Add native/hybrid application window with sample application details

  1. Optionally, configure the Desired Capabilities.

  2. Click Connect and continue the scan as described in chapter "Select controls to steer".

Add a cloud device

If you don't want to use the Load cloud devices option, you can manually add a cloud device.

In the Add device window, enter the information described in the table below and click Add.

Label

Description

Choose a connection

Select a Sauce Labs connection or create a new one.

Enter a name for your device

Enter a custom name for your Sauce Labs device.

The Mobile Engine 3.0 uses this name as a mobile configuration name under the node Mobile->Connections.

Enter the device ID

Enter the ID of your Sauce Labs device.

Example: Samsung_Galaxy_S9

Alternatively, you can use dynamic device allocation.

Enter the device platform version

This parameter is optional.

You can enter the platform version of your Sauce Labs device. The Mobile Engine 3.0 saves it in the mobile configurations and you can later use it as an OSVersion TCP.

iOS

Android

Select the platform of your device.

Additionally, for iOS, select Simulated or Real.

Use dynamic device allocation in Sauce Labs

To enable dynamic allocation of devices in Sauce Labs, use dynamic expressions instead of the full device name, for example: iPhone.*.

For detailed information, see the Sauce Labs documentation.

Load and filter devices in Perfecto and Sauce Labs

Once you have configured the connection to Perfecto or Sauce Labs in the Add connection window, you can automatically retrieve all devices, emulators, and simulators from these clouds.

To do so, select the check box Load cloud devices in the Mobile Scan window.

You can also filter the devices with the following dropdown menus:

  • Platform: select iOS or Android.

  • OS Version: select or deselect the version of the operating system.

  • Type: select the type of the device whether it's real or simulated/emulated.

Load cloud devices in the Mobile Scan