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
In the left-side navigation pane, choose Testing Services > Device Farm. The Device Farm page appears.
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.
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.
Root permissions are disabled for all Android devices.
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 |
| ||
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
Go to the remote debugging page of the specified device. The Apps tab appears by default.
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.
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.
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.
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.
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.
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.
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.
The size of a file that you want to upload must be smaller than 256 MB.
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.
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
On the remote debugging page of the specified device, click More and then select Positioning. The Positioning tab appears.
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.
Use one of the following methods to specify a location that you want to search:
Configure the Longitude and Latitude parameters. Then, click Determine.
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.
NoteYou 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
On the remote debugging page of the specified device, click More and then select Scan code. The Scan code tab appears.
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.
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.
Select Album for QR code scanning.
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.
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.
For information about a performance test report and the description of the corresponding data, see View a test report.