TestComplete
  • 02 May 2023
  • 2 Minutes to read
  • Dark
    Light

TestComplete

  • Dark
    Light

Article Summary

TestComplete integration with pCloudy

TestComplete is an automation tool which helps you to test your desktop, web and mobile applications. This documentation will help you to integrate TestComplete with pCloudy to run your existing TestComplete scripts on pCloudy's real devices.

Pre-requisites

• TestComplete configured on the local machine.
• User must be register on pCloudy.
• The Application needs to be uploaded to My data section.

Running test on Single device

  1. User can launch TestComplete and create a new project by clicking on “New” and selecting the “Scripting Language”.
    image.png
    image.png

  2. Next, you can 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:

  1. For iOS applications that are developer build versions, the user will need to Re-sign the application before installing it on the pCloudy devices.
  2. The user 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" : "john.doe@abc.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();
  }

image.png

  1. Now click on “Run This Routine” to run the script.
    image.png

  2. Once the execution starts the mentioned device from the capabilities will be acquired and the user can view the session live under the “My Active Sessions” tab on the pCloudy platform.
    image.png
    image.png

  3. The user can view the logs on TestComplete and avail the testing reports for the session under the “Reports” section on the pCloudy platform.
    image.png

pCloudy Reports

image.png

Running tests parrallely on multiple devices

  1. 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 parallely on this script.

Note: The user can create the capabilities using Capability Configurator on the pCloudy paltform and add the prefix “appium” to pCloudy specific capabilities as mentioned below.

Function Test1()
{
var capabilities = {
  "appium:pCloudy_Username" : "rakesh.kumar@sstsinc.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();
  }

image.png
image.png
image.png

  1. Now choose “Main” for the execution and click on “Run This Routine” to run the scripts.
    image.png
    image.png

  2. Once the execution starts the mentioned device from the capabilities will be acquired and the user can view the session live under the “My Active Sessions” tab on pCloudy platform.
    image.png
    image.png

  3. User can view the logs on TestComplete and can avail the test reports for the session under the “Reports” section on the pCloudy platform.
    image.png

pCloudy Reports

image.png


What's Next