4. Connect to a Device and Open a Testing Session

Applies to TestComplete 15.63, last modified on April 23, 2024

Before the recording starts, specify a device, on which you want to record a test, and open a testing session for the Orders application:

  1. TestComplete shows the Select BitBar Device dialog. It lists all mobile devices that BitBar provides:

    Getting Started with TestComplete: Selecting an iOS device

    Click the image to enlarge it.

  2. Select any of the available iOS devices.

    There are few devices available for trial users. We will use iPhone 7 in this tutorial.

  3. To open a testing session for the Orders application, it must be uploaded to the target device. If you have specified a valid .ipa file on the previous step, TestComplete will upload the file automatically.

  4. For the tested application to start on the selected device automatically when the recording begins, specify the bundle ID of the application. It is the bundle ID that was used to compile the specified .ipa file.

    Click View more BitBar parameters to switch the dialog to the Advanced mode:

    Getting Started with TestComplete: Viewing more BitBar parameters

    Click the image to enlarge it.

    Switch to the Custom Parameters tab and add the bundleId capability to the list of desired capabilities:

    Getting Started with TestComplete: Specifying the bundle ID of the tested application

    Click the image to enlarge it.

    If you skip this step, you will have to launch the application manually.

  5. By default, mobile devices running in the BitBar cloud are configured to automatically close all notifications, messages, and alerts. In this tutorial, we are going to record the user interactions with the alert that the Orders application shows, therefore, we need to configure the device not to handle alerts.

    If you use TestComplete version 15.10, it will configure the device automatically. You can skip this step.

    If you use a TestComplete version prior to version 15.10, on the Custom Parameters tab, add the autoAcceptAlerts or autoDismissAlerts capability set to false to the list of desired capabilities.

    Example

  6. Click OK to proceed.

  1. TestComplete shows the Select BitBar Device dialog. Click Local Appium:

    Getting Started with TestComplete: Specifying an iOS device managed by a local Appium server

    Click the image to enlarge it.

  2. In the Server URL text box, enter the URL address of your Appium server. For Appium 2.x, the format of the URL should be http://localhost:4723 and for Appium 1.x the format should be http://localhost:4723/wd/hub.

    In the Application Path text box, specify the full path to the tested application (Orders.ipa). Specify the application path relatively to the Appium server location.

    In the Parameters editor, enter the capabilities that describe a testing session you want to open, in the JSON format. The dialog will validate the JSON code as you are typing.

    The following capabilities are required:

    • platformName - The name of the mobile OS where you want to open a testing session.

    • platformVersion - The version of the mobile OS where you want to open a testing session.

    • deviceName - The mobile device or emulator on which you want to run your test.

    • automationName - The test automation framework to use. For iOS, it is XCUITest.

    For example:

    JSON

    {
      "platformName" : "iOS",
      "platformVersion" : "14.0",
      "deviceName" : "iPhone 5S",
      "automationName" : "XCUITest"
    }

    If needed, add more capabilities. For information on all available capabilities, see Appium Capabilities.

  3. Click OK to proceed.

TestComplete will connect to the specified device, install the Orders application to it and open a testing session for the application. The Mobile Screen window of TestComplete will show the screen of the connected device. To record user actions over a tested application, interact with the application in that window.

Prev     Next

See Also

Testing iOS Applications - Tutorial
About Mobile Tests
Connecting to Mobile Devices and Opening Testing Sessions

Highlight search results