TestComplete
  • 16 Oct 2023
  • 2 Minutes to read
  • Dark
    Light

TestComplete

  • Dark
    Light

Article Summary

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

  1. Launch TestComplete and create a new project by clicking on “New” and select the “Scripting Language”.
    image.png
    image.png

  2. 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();
}

image.png

  1. Now click on “Run This Routine” to run the script.
    image.png
  2. 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.
    image.png
    image.png
  3. You can view the logs on TestComplete and you can get the reports for the session under the “Reports” section on pCloudy portal.
    image.png
    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 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();
      }
    

    image.png
    image.png
    image.png

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

  3. 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.
    image.png
    image.png

  4. You can view the logs on TestComplete and you can get the reports for the session under the “Reports” section on pCloudy portal.
    image.png
    image.png


Was this article helpful?

What's Next