Configure tests for Android devices and emulators

You can run the Mobile Engine 3.0 TestCases locally or remotely connected Android devices and emulators. This chapter provides an overview of the test configuration parameters (TCPs) you can use to configure your tests on Android devices and emulators.

For information on configuring the tests of Android applications in online clouds, see chapter "Configure tests for Android in online clouds".

Generic TCPs

The table below contains the TCPs that are applicable for all Android devices and emulators.

Test configuration parameters

Description

Optional

Browser

Enter ChromeAndroid to automate hybrid and mobile web applications on Android.

ExecuteInParallel

Add this test configuration parameter on the ExecutionLists Folder level and set its value to True to run your mobile tests in parallel.

LiveView

Live View enables you to display a preview of the Android device or emulator during test execution. To activate it, set the test configuration parameter LiveView to True.

ScreenFlow

If you want Tricentis Tosca to automatically save the screenshots of TestStepValues with ActionMode Input, set this parameter to True.

For detailed information, see chapter "Take screenshots of TestStepValues with ActionMode Input".

ScreenFlowPath

Specify the path where you want Tricentis Tosca to save the screenshots of TestStepValues.

For detailed information, see chapter "Take screenshots of TestStepValues with ActionMode Input".

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 test configuration parameter and set its value to True.

Specify TCPs for Android devices and emulators

To run the test cases on an Android device or emulator, specify the test configuration parameters as described in the table below.

Test configuration parameters

Description

AppiumServer

If you automate locally connected Android devices or emulators, you don't need to specify the AppiumServer test configuration parameter.

If you automate a remotely connected Android device or emulator, you need to specify the AppiumServer test configuration parameter. To do so, start the server manually and enter the Appium server address.

The Appium server address consists of the IP address of your PC or Mac, the default Appium port 4723 and the standard path for the Appium server /wd/hub.

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

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

For test automation on Android devices or emulators connected to a Mac, enter the address on which the Appium server is running.

DeviceName

If you connect one Android device to your computer, you don't have to specify this test configuration parameter.

If you connect multiple Android devices to your computer and you want to automate a specific one, enter the ID of the connected Android device into the value of the DeviceName test configuration parameter.

For Android emulators, enter the full name of the emulated device as shown in the emulated window.

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.

Example - Configure the TestCases of a native application on a locally connected Android device

In the example below, you run the TestCase Shopping in a native application on a locally connected Android device. There is only one Android device connected to your workstation, so you don't need to specify any test configuration parameters.

TestCase of a native application on a locally connected Android device

Example - Configure the TestCases for a web application on a locally connected Android device

In the example below, you run the TestCase Shopping in Chrome for Android. Because you connect multiple Android devices to your workstation with Tricentis Tosca, you have specified also the DeviceName test configuration parameter.

TCPs for a mobile web application on a locally connected Android device