Configure mobile tests

Once you have prepared your Android or iOS device for test automation and created Modules using the Mobile Scan, you need to specify test configuration parameters (TCPs).

These TCPs depend on the mobile platform, application, and connection you use.

This chapter gives you an overview of all available mobile TCPs. Additionally, it has detailed information on the following TCPs:

For information on how to use mobile TCPs in your tests, see the chapters below.

For information on how to use mobile configuration TCPs that the Mobile Scan creates, see chapter "Use Mobile configurations".

Mobile TCPs overview

The table below lists all TCPs that you can configure for your mobile tests.

Mobile TCP

Description

AppiumServer

Add this TCP to specify the Appium server address.

For more information, see chapter "Specify the AppiumServer TCP".

Browser

Add this TCP if you automate hybrid or mobile web applications:

  • For an Android application, enter the value ChromeAndroid.

  • For an iOS application, enter the value SafariiOS.

DeviceName

Add this TCP to specify the device on which you want to execute your mobile tests.

If you connect only one Android device to your computer, you don't need to specify the DeviceName TCP.

For detailed information, see chapter "Specify the DeviceName TCP".

ExecuteInParallel

If you want to run your mobile tests in parallel, use this TCP with the value True.

ExperitestAccessKey

Add this TCP if you run your tests in Experitest.

Enter the access key of your Experitest account.

For detailed information, see chapter "Specify TCPs for Experitest".

ExperitestAppiumVersion

Optionally, add this TCP if you run your tests in Experitest.

For detailed information, see chapter "Specify TCPs for Experitest".

IsSimulator

Add this TCP if you run your tests in online clouds.

Specify the type of device that you use for test automation:

  • Set this parameter to True if you use an iOS simulator.

  • Set this parameter to False if you use a real device.

You can also use this TCP for local or remote test automation if you want to overwrite a default identification mechanism.

LiveView

Add this TCP and set its value to True to enable Live View during test execution.

MobileLabsAccessKey

Add this TCP if you run your tests in GigaFox.

Enter the access key of your GigaFox account.

For detailed information, see chapter "Specify TCPs for GigaFox (ex. Mobile Labs)".

MobileLabsUsername

Add this TCP if you run your tests in GigaFox.

Enter the user name of your GigaFox account.

For detailed information, see chapter "Specify TCPs for GigaFox (ex. Mobile Labs)".

OSVersion

Add this TCP in the following situations:

  • If you automate a local or remote iOS simulator.

  • If you automate tests in Sauce Labs.

  • If you don't want to provide the exact ID of your Android device, but you want to trigger test automation on a specific version of Android. In this case, enter the version of your Android operating system. Tricentis Tosca automatically runs the tests on a device that matches this parameter.

PerfectoToken

Add this TCP if you run your tests in Perfecto.

Enter your security token for your Perfecto account.

For detailed information, see chapter "Configure tests in Perfecto".

SauceAccessKey

Add this TCP if you run your tests in Sauce Labs.

Enter the access key for your Sauce Labs account.

For detailed information, see chapter "Specify TCPs for Sauce Labs".

SauceUsername

Add this TCP if you run your tests in Sauce Labs.

Enter the user name of your Sauce Labs account.

For detailed information, see chapter "Specify TCPs for Sauce Labs".

ScreenFlow

Add this TCP and set its value to True to automatically save the screenshots of TestStepValues with ActionMode Input.

If you add this TCP, you must also add the ScreenFlowPath parameter.

ScreenFlowPath

Specify the path where you want Tricentis Tosca to automatically save the screenshots of TestStepValues with ActionMode Input.

If you add this TCP, you must also add the ScreenFlow parameter.

UseXBrowserForMobile

As of Tricentis Tosca 13.2, the test automation of web applications is based on a new and fast mobile HTML engine.

However, if you want to use the previous technology, add this TCP and set its value to True.

XPathEnabled

This TCP concerns deprecated control identification functionality. For information on when and how to re-enable this functionality, see this Knowledge Base article.

Specify the AppiumServer TCP

You must specify the Appium server address in the following situations:

  • If you use an iOS or Android device connected to a Mac. The Appium server address should contain the IP address of a Mac on which you run Appium.

  • If you use an iOS simulator on a Mac. The Appium server address should contain the IP address of a Mac on which you run Appium.

  • If you use a remotely connected Android device or emulator. To find the Appium server address, you must start the server manually.

  • If you run your tests in the clouds. For detailed information, see chapter "Configure tests in online clouds".

As the value of the AppiumServer TCP, enter the Appium server address.

Structure of the Appium server address

For remote connections, the Appium server address consists of the following elements:

  • The IP address of your PC or Mac.

  • Appium port. The default Appium port is 4723.

  • The standard path for the Appium server, that is /wd/hub.

Example: http://192.168.43.142:4723/wd/hub

For the structure of the Appium server address in the clouds, see chapter "Configure tests in online clouds".

Verify the Appium server address

You can verify if the Appium server address works correctly by opening it in a browser.

Start the Appium server manually

To start the Appium server manually, go to TRICENTIS->Tosca Testsuite->Tbox->Appium, run the appium.cmd file as an administrator and press Enter.

Specify the DeviceName TCP

The table below explains which value you need to enter for the DeviceName TCP.

Situation

TCP Value

One locally connected iOS device

Enter Auto or leave this parameter empty.

Multiple locally connected iOS devices

Enter Auto or leave this parameter empty if you want to trigger the test automation on a random device.

If you want to trigger the test automation on a specific device, enter the UDID of this device.

One locally connected Android device

You don't need to specify this test configuration parameter.

Multiple locally connected Android devices

Enter Auto or leave this parameter empty if you want to trigger the test automation on a random device.

If you want to trigger the test automation on a specific device, enter the ID of this device.

Alternatively, if you don't want to provide the name of your device, you can enter the OSVersion TCP instead.

Android emulator

Enter the full name of the emulated device which is displayed in the emulator.

iOS simulator

Enter the full name of the simulated device which is displayed in the simulator.

iOS or Android test automation in clouds

Enter the name of the device, emulator, or simulator that is displayed in the cloud. For detailed information, see chapter "Configure tests in online clouds".

Find the UDID of locally connected iOS devices and simulators

To find the IDs of iOS devices connected to your Mac, follow the steps below:

  1. Connect your device to your Mac.

  2. Go to iTunes.

  3. Click on the phone icon in the top menu.

    You can find the UDID in the pane on the right side.

Find the IDs of locally connected Android devices and emulators

To find the IDs of Android devices and emulators connected to your computer, follow the steps below:

  1. To open the command prompt, click the Start button and enter cmd into the search field.

  2. Enter adb devices into the command prompt to display a list of all connected Android devices.

  3. Copy the ID of the device you want to use for test automation.