All Products
Search
Document Center

Mobile Testing:Remote debugging

Last Updated:Jul 11, 2023

This topic describes how to apply for a remote device, install an app on the remote device, and perform a QR code scanning test, a positioning test, and a performance test of the app.

Prerequisites

  • Resource plans for remote debugging are purchased, or your resource usage does not exceed the free quota. For more information, see Pricing.

  • (Optional) The Android app that you want to debug is uploaded. For information about how to upload an app, see Upload an app.

References

You can apply for a remote device of a specific model to perform test tasks to reproduce issues. Perform the following operations to complete remote debugging:

Apply for a remote device

  1. In the left-side navigation pane, choose Testing Services > Device Farm. The Device Farm page appears.

  2. Select a remote device on which you want to perform remote debugging.

    • Enter a keyword in the search box to search for remote devices of the specified brand or model.

    • Click Show Filter to show filter conditions for remote devices. You can specify one or more conditions to filter the remote devices that meet the specified conditions.

Note

The filter conditions include Brand, Android Version, iOS Version, Harmony Version, Resolution, Time to Market, and Others.

3. In the remote device list, move the pointer over a device that you want to use and click Use Now. The remote debugging page of the specified device appears.

Note

Root permissions are disabled for all Android devices.

远程真机1814

Remote device description

A remote device can be used to simulate the basic operations on a device on web pages.

No.

UI element

Control

Description

1

System settings toolbar

Terminal type

The brand and model of the remote device.

Usage duration

  • The used duration of the free quota or resource plan.

  • The remaining duration of the free quota or resource plan.

High/Standard

Switches between high definition and standard definition.

Enter Install Password (Oppo/Vivo)

When you use Android Debug Bridge (adb) to connect remote devices to perform remote debugging, some remote devices must be verified before you log on to them. In this case, click the Enter Install Password (Oppo/Vivo) icon.

Lock Screen

Locks the screen of the remote device.

Rotate Screen

Switches between the landscape mode and the portrait mode.

Obtain the device clipboard content

Copies the content in the clipboard of the remote device to the Mobile Testing console.

Shortcut keyboard

The window for shortcut inputs. You can enter letters, digits, and common special characters.

Go to App Management

Navigates to the App Management page.

2

Full Screen icon

-

Shows the remote device in full screen mode.

3

System icons

-

Simulate three system icons of an Android mobile phone.

4

Window size adjustment slider

-

Controls the window size of the remote device.

Install an app

  1. Go to the remote debugging page of the specified device. The Apps tab appears by default.

  2. Search for the app that you want to debug.

    • If the app that you want to debug is uploaded and installed, click Uploaded or Installed to filter apps.

    • Then, enter a keyword in the search box to search for the app by name. Fuzzy match is supported.

  3. Upload the app that you want to debug. If the app that you want to debug is not uploaded, click Upload Test App to upload the app. For more information about how to upload an app, see Upload an app.

  4. Install the app that you want to debug. If the app is uploaded but not installed, click Installation in the Actions column to install the app on the remote device.

28E20872-00C2-4BD2-90F8-480EA5BA5ED4

View logs

1. On the remote debugging page of the specified device, click the Logs tab.

2. On the Logs tab, turn on the logging switch to start recording the logs of the device.

3. Select a level from the Select Level drop-down list to show logs of the specified level.

4. Enter a keyword in the search box to search for log information. Fuzzy match is supported.

5. Turn on Scroll to scroll through the latest log entries in the log list.

6. Click Download Logs to download log information as a text file to your local device.

7. Click Clear Logs to clear the log list.

日志页签1428

Take screenshots or record screens

Go to the Screenshots tab

1. On the remote debugging page of the specified device, click the Screenshots tab.

2. On the Screenshots tab, check the Screenshots and Recordings subtabs.

3. Click the Screenshots subtab to view screenshots and take screenshots. Click the Recordings subtab to view recordings and record screens.

4. Click the Large Image or Small Image icon to switch the display mode of the screenshots or recordings.

Take screenshots

1. Click the Screenshots subtab.

2. In the left-side window, perform operations on the app that is installed on the remote device.

3. Click the Click to Take Screenshot action button to take a screenshot of the current app UI on the device. The screenshot that you took is displayed on the Screenshots subtab.

截屏1500 Record screens

1. Click the Recordings subtab.

2. Click the Start Screen Recording action button to start screen recording. After you click the Start Screen Recording action button, the Start Screen Recording action button changes to the Stop Screen Recording action button.

3. In the left-side window, perform operations on the app that is installed on the remote device.

4. Click the Stop Screen Recording action button to stop screen recording. The recording is displayed on the Recordings subtab.

录屏1505

Edit screenshots or recordings

1. Move the pointer over the screenshots or recordings that you want to edit and select the corresponding check boxes. You can also click All to select all screenshots or recordings.

2. Select one or more screenshots or recordings and click the Delete icon to delete them.

Upload a file

1. On the remote debugging page of the specified device, click the Files tab.

2. In the Quick Access field, enter a complete path of a specified directory.

3. Click the upload section to select a file or drag the file to the upload section to upload the file to the specified directory.

Note

The size of a file that you want to upload must be smaller than 256 MB.

文件页签1555
Note

You cannot create or manage a directory.

Configure remote debugging

Before you configure remote debugging, make sure that the adb debugging tool is installed on your on-premises machine.

1. On the remote debugging page of the specified device, click More and then select ADB. The ADB tab appears.

2. On the ADB tab, click Start ADB Debugging to generate the command for remote debugging.

adb调试1604

3. Run the command for remote debugging in the command line of the adb debugging tool.

4. Run the adb devices command to view devices. If the current device is displayed in the list, start remote debugging.

5. After remote debugging is complete, run the adb disconnect command to close the connection.

Perform a positioning test

  1. On the remote debugging page of the specified device, click More and then select Positioning. The Positioning tab appears.

  2. In the left-side window, start the installed app that you want to test. For information about how to install an app, see Install an app.

  3. Use one of the following methods to specify a location that you want to search:

    1. Configure the Longitude and Latitude parameters. Then, click Determine.

    2. Enter a location that you want to search in the Location search field and press Enter.

    If the positioning succeeds, the "Virtual positioning succeeded" message appears.

    Note
    • You must enable the positioning feature on your remote device.

    • You must enable the positioning feature in your browser and allow the browser to share your location.

    • Make sure that you perform a positioning test over the Internet. The map can be displayed only if you use the Internet.

    定位功能

Perform a QR code scanning test

  1. On the remote debugging page of the specified device, click More and then select Scan code. The Scan code tab appears.

  2. Click the upload section to select a file or drag the file to the upload section to upload the file to the specified directory.

    If the file is uploaded, the File uploaded! message appears.

  3. In the left-side window, start the installed app that you want to test. Use the QR code scanning feature of the app. For information about how to install an app, see Install an app.

  4. Select Album for QR code scanning.

  5. Select a photo on which you want to perform a QR code scanning test from the album. Then, the system automatically scans the photo.

    扫码测试

Run a performance test

1. On the remote debugging page of the specified device, click More and then select Performance Test. The Performance Test tab appears.

2. Select the app that you want to test from the app drop-down list.

3. Select the process that you want to test from the process drop-down list. By default, Master Process is selected.

4. Click the 开始测试 icon to start plotting the performance data of the specified process of the specified app. After you click the 开始测试 icon, the icon changes to the 停止测试 icon.

5. In the left-side window, perform operations on the app and view the changes in the plotted data.

6. Click the 保存结果 icon. In the Save to Test Case panel, enter a task name in the Task Name field, select a directory and a test case to which you want to save the results, and then click OK.

保存到用例1638
Note

You must configure a directory and a test case before you save results. If no directory or test case is configured, click Create Test Case or Create Directory to create a test case or a directory. The created directory and test case are displayed in Test Case hierarchy tree on the Performance Testing page. For more information, see Manage test cases.

7. Click the 停止测试 icon to finish plotting performance data.

8. Click the 清空数据 icon to clear the plotted data.性能测试1630

For information about a performance test report and the description of the corresponding data, see View a test report.