All Products
Search
Document Center

Mobile Testing:Remote debugging

Last Updated:Jul 11, 2023

This topic describes how to use a remote device to reproduce issues and perform remote debugging.

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 iOS app that you want to debug is uploaded. For more 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:

Apply for a remote device

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

  2. Enter a keyword in the search box to search for remote devices of the specified brand or model. For example, you can enter Apple. You can also click Show Filter to show filter conditions. 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 , and Others.

  3. In the remote device list, move the pointer over an Apple device and click Use Now. The remote debugging page of the specified device appears.

Remote device description

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

截屏2021-02-19 下午3

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.

Go to System Settings

Navigates to the System Settings page.

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.

2

Full Screen icon

-

Shows the remote device in full screen mode.

3

Home key

-

The Home key of the iOS device.

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.

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

    2. 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 or Install (without re-signing) in the Actions column to install the app on the remote device.

    Note

    The Installation and Install (without re-signing) methods have the following differences:

    • Installation: supports debug packages. The packages can be installed after they are re-signed by Mobile Testing.

    • Install (without re-signing): supports packages that are signed by using enterprise certificates. The packages can be installed directly by Mobile Testing without re-signing.

D89B7224-4519-4201-B6E2-3D01DD3B50DD

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.

查看iOS远程真机日志1423

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.

截屏1442

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.

截屏1446

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.

录屏1448

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 Download icon to download them. You can also click the Delete icon to delete them.

编辑1452

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.

    扫码测试

Important

After the scanning is complete, delete the QR code image from Photos and Recently Deleted. Otherwise, Mobile Testing saves the QR code image to Recently Deleted.

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. 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.

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

Note

Move the pointer over a trend chart. You can then view the instantaneous value of a specific point in time.

5. 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.

保存到用例1509
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.

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

7. Click the 清空数据 icon to clear the plotted data.

性能测试1507

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