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". |
Add this TCP if you automate hybrid or mobile web applications:
|
|
DeviceManufacturer |
Add this TCP if you run your tests in Perfecto if you want to use dynamic device allocation. For detailed information, see chapter "Dynamic device allocation in Perfecto". |
DeviceModel |
Add this TCP if you run your tests in Perfecto if you want to use dynamic device allocation. For detailed information, see chapter "Dynamic device allocation in Perfecto". |
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. |
Add this TCP if you run your tests in online clouds. Specify the type of device that you use for test automation:
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. |
Add this TCP in the following situations:
|
|
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. |
SkipVisibilityCheck |
Add this TCP and set its value to False, if you want Tricentis Tosca to check control visibility for test automation. By default,Tricentis Tosca checks control visibility for local execution and it doesn't check control visibility for execution in the clouds. For detailed information, see chapter "Enable controls visibility check in the clouds". |
TapByCoordinates |
Add this TCP if you want to simulate a tap on a control for which you specified a {CLICK} action. Use this TCP as a fall-back mechanism if you experience steering issues related to the {CLICK} action. For detailed information, see chapter "Enable the fall-back mechanism for {CLICK} action". |
TestProjectToken |
Add this TCP if you run your tests in TestProject. Enter your developer token. For detailed information, see chapter "Run mobile tests via TestProject". |
UseTestProjectAgent |
Add this TCP if you run your tests in TestProject. For detailed information, see chapter "Run mobile tests via TestProject". |
UseXBrowserForMobile |
Add this TCP if you want to use XBrowser Engine 3.0 instead of Mobile Engine 3.0. To handle any issues related to controls and frames, add this TCP and set its value to True. |
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:
-
Connect your device to your Mac.
-
Go to iTunes.
-
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:
-
To open the command prompt, click the Start button and enter cmd into the search field.
-
Enter adb devices into the command prompt to display a list of all connected Android devices.
-
Copy the ID of the device you want to use for test automation.