- 16 Oct 2023
- 2 Minutes to read
- Print
- DarkLight
TestComplete
- Updated on 16 Oct 2023
- 2 Minutes to read
- Print
- DarkLight
Overview
TestComplete is an automation tool which helps you to test your desktop, web and mobile application. This documentation will help you to integrate TestComplete with pCloudy to run your existing TestComplete scripts on pCloudy real devices.
Pre-requisites
- TestComplete configured on the local machine.
- An account with pCloudy.
- The Application needs to be uploaded to My data section.
Steps to run tests on a Single device
Launch TestComplete and create a new project by clicking on “New” and select the “Scripting Language”.
Create a New “Unit” under “Script” and add the capabilities in the script as mentioned below.
Example: We are connecting to an iOS device and installing an application to be launched.
Note: For iOS application, If it is a developer build, you need to Re-sign the application before you could install it on the pCloudy devices.Note:
- For iOS application, If it is a developer build, you need to Re-sign the application before you could install it on the pCloudy devices.
- You can create the capabilities using Capability Configurator from pCloudy portal and add the prefix “appium” to pCloudy specific capabilities as mentioned below and provide the “bundleId” for your iOS application.
Function Test1()
{
var capabilities = {
"appium:pCloudy_Username" : "abcd@1234.com",
"appium:pCloudy_ApiKey":"Your APIkey",
"appium:pCloudy_DurationInMinutes":"10",
"newCommandTimeout":"600",
"launchTimeout":"90000",
"deviceName":"Apple_iPhone14_ios_16.0.1_fe1c6",
"platformVersion":"16.0.1",
"platformName":"ios",
"acceptAlerts":"true",
"automationName":" XCUITest ",
"appium:pCloudy_ApplicationName":" TestmunkDemo_Resigned1672048338.ipa ",
"bundleId":"com.pcloudy.TestmunkDemo",
"appium:pCloudy_EnableVideo":"true",
"appium:pCloudy_EnablePerformanceData":"true",
"appium:pCloudy_EnableDeviceLogs":"true",
}
var server = ("https://device.pcloudy.com/appiumcloud/wd/hub")
Mobile.ConnectDevice(server,capabilities);
var device = Mobile.Device();
}
- Now click on “Run This Routine” to run the script.
- Now the mentioned device from the capabilities will be acquired and you can view the session live under the “My Active Sessions” tab on pCloudy portal.
- You can view the logs on TestComplete and you can get the reports for the session under the “Reports” section on pCloudy portal.
Running tests parrallely on multiple devices
Create a new “Unit” under “Script” and add the scripts as mentioned below.
Example: We are adding three different tests cases (Function MyTest1, Function MyTest2, Function MyTest3) to acquire different Android devices parrallely on this script.Note: You can create the capabilities using Capability Configurator from pCloudy portal and add the prefix “appium” to pCloudy specific capabilities as mentioned below.
Function Test1() { var capabilities = { "appium:pCloudy_Username" : "abcd@1234.com", "appium:pCloudy_ApiKey":"Your APIKey", "appium:pCloudy_DurationInMinutes":"10", "newCommandTimeout":"600", "launchTimeout":"90000", "deviceName":"SAMSUNG_GalaxyS23_Android_13.0.0_ec498", "platformVersion":"13.0.0", "platformName":"Android", "automationName":"uiautomator2", "appium:pCloudy_ApplicationName":"pCloudyAppiumDemo.apk", "appPackage":"com.pcloudy.appiumdemo", "appActivity":"com.ba.mobile.LaunchActivity", "appium:pCloudy_EnableVideo":"true", "appium:pCloudy_EnablePerformanceData":"true", "appium:pCloudy_EnableDeviceLogs":"true", }var server = ("https://device.pcloudy.com/appiumcloud/wd/hub") Mobile.ConnectDevice(server,capabilities); var device = Mobile.Device(); }
Now choose “Main” for the execution and click on “Run This Routine” to run the scripts.
Now the mentioned device from the capabilities will be acquired and you can view the session live under the “My Active Sessions” tab on pCloudy portal.
You can view the logs on TestComplete and you can get the reports for the session under the “Reports” section on pCloudy portal.