Use of the phone APP adb command to do stress tests
In everyday software tests, stress tests done on the app is essential, because the test on the system continue to exert pressure, is a system by identifying bottlenecks or can not receive performance points, to get the maximum service level of the system can provide test, that is, we can simulate a huge workload to view the application how to perform the operation at peak usage.
1 prerequisites to do stress tests are as follows: First, we need to be installed on the computer abd name, install adb can download in Baidu's official website that the search JDK official website to download in Baidu, the installation process has been standard in not described, the process is relatively simple, after you install the adb noted that for the configuration environment
2 after installation into the command cmd command input interface adb
It appears as follows adb install version proved successful
3 usb phone connected to the phone, the phone connected to the computer is a mobile phone developers need to open usb debugging options and
4 Enter cmd to open the command adb devices
It represents the following prior successful connection devices for the device name indicates a successful connection
5 to enter the Android Gets name adb shell
That enter the Android exit enter exit to exit Andrews
After 6 into the system enter the command:
Obtaining a third-party installation package name: pm list packages -3
Get All installation package enter the command: pm list packages
View package system: adb shell pm list packages -s
Installation packages are from the beginning of the com
7 want to get their own installation package name
Method One: After obtaining the name you want to find the installation package obtained by name
Method Two: Open the phone, enter the system application, click the application information, you can also get the name of the app installation package
App to start stress testing after 8 to obtain the installation package name
Enter the command: monkey -p installation package name the number of events
For example: the number of simulated events monkey -p com.tencent.mobileqq 100 of 100 qq
This time the phone will automatically perform clicks 100
9 can also set the interval Event clicks
Enter the command: adb shell monkey -p package name --throttle interval event (in milliseconds) executions
In everyday software tests, stress tests done on the app is essential, because the test on the system continue to exert pressure, is a system by identifying bottlenecks or can not receive performance points, to get the maximum service level of the system can provide test, that is, we can simulate a huge workload to view the application how to perform the operation at peak usage.
1 prerequisites to do stress tests are as follows: First, we need to be installed on the computer abd name, install adb can download in Baidu's official website that the search JDK official website to download in Baidu, the installation process has been standard in not described, the process is relatively simple, after you install the adb noted that for the configuration environment
2 after installation into the command cmd command input interface adb
It appears as follows adb install version proved successful
3 usb phone connected to the phone, the phone connected to the computer is a mobile phone developers need to open usb debugging options and
4 Enter cmd to open the command adb devices
It represents the following prior successful connection devices for the device name indicates a successful connection
5 to enter the Android Gets name adb shell
That enter the Android exit enter exit to exit Andrews
After 6 into the system enter the command:
Obtaining a third-party installation package name: pm list packages -3
Get All installation package enter the command: pm list packages
View package system: adb shell pm list packages -s
Installation packages are from the beginning of the com
7 want to get their own installation package name
Method One: After obtaining the name you want to find the installation package obtained by name
Method Two: Open the phone, enter the system application, click the application information, you can also get the name of the app installation package
App to start stress testing after 8 to obtain the installation package name
Enter the command: monkey -p installation package name the number of events
For example: the number of simulated events monkey -p com.tencent.mobileqq 100 of 100 qq
This time the phone will automatically perform clicks 100
9 can also set the interval Event clicks
Enter the command: adb shell monkey -p package name --throttle interval event (in milliseconds) executions