4. Connect to a Device and Open a Testing Session

Applies to TestComplete 15.68, last modified on October 16, 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 Android device

    Click the image to enlarge it.

  2. Select any of the available Android devices.

    There are few devices available for trial users. We will use Google Pixel in this tutorial.

    Note: You can click View more BitBar parameters to access advanced options. However, these options are beyond the scope of this tutorial. We will not delve into them and will move further.

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

  4. Click OK to proceed.

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

    Getting Started with TestComplete: Specifying an Android 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.apk). 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 Android, it is UIAutomator2.

    For example:

    JSON

    {
      "platformName" : "Android",
      "platformVersion" : "11",
      "deviceName" : "Pixel 2",
      "automationName" : "UIAutomator2"
    }

    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 Android Applications - Tutorial
About Mobile Tests
Connecting to Mobile Devices and Opening Testing Sessions

Highlight search results