Android Automated Stress test-monkey 1

Source: Internet
Author: User

Monkey is a command-line tool in Android that can be run in the emulator or in the actual device. It sends pseudo-random user event streams (such as key input, touch input, gesture input, etc.) to the system, enabling stress testing of the application under development. Monkey testing is a fast and effective method to test the stability and robustness of the software.

Recently in the test company mobile phone software app, the time to study the next mobile phone automatic stress test-monkey, as follows:

Step 1: Computer environment preparation: build Android development environment

Step 2: Mobile Environment Preparation: Install the apk you want to test

Step 3: Open cmd, enter the ADB shell, the command is as follows:

c:\users\chenshan>adb shell[email protected]monkey-p cn.emoney.acg-v

Description:-P: Specifies the package name where the APK is being tested, the main activity (the first activity started) (I asked the developer)
-V: Specifies the number of tests

The results of the operation are as follows:

Monkey-p Cn.emoney.acg-v 500: Monkey:seed=1423954039925 count=500: AllowPackage:cn.emoney.acg:IncludeCategory:android.intent.category.LAUNCHER:IncludeCategory: Android.intent.category.MONKEY//Event Percentages://0:15.0%//1:10.0%//2:2.0%//3:15.0%//4: -0.0%//5:25.0%//6:15.0%//7:2.0%//8:2.0%//9:1.0%//10:13.0%: Switch: #Intent; action=android.intent.action.main;category=Android.intent.category.launcher;launchflags=0x10200000;component=cn.emoney.acg/. Securityhome;end//allowing start of Intent {Act=android.intent.action.main cat=[android.inTent.category.LAUNCHER] cmp=cn.emoney.acg/. Securityhome} in Packagecn.emoney.acg:Sending Touch (action_down):0: (636.0,1832.0): Sending Touch (ACTION_UP):0: (614.0191,1819.9386): Sending Touch (action_down):0: (430.0,1614.0): Sending Touch (ACTION_UP):0: (504.59412,1667.4562): Sending Touch (action_down):0: (788.0,534.0): Sending Touch (ACTION_UP):0: (780.03546,539.9423): Switch: #Intent; action=android.intent.action.main;category=Android.intent.category.launcher;launchflags=0x10200000;component=cn.emoney.acg/. Securityhome;end//allowing start of Intent {Act=android.intent.action.main cat=[android.inTent.category.LAUNCHER] cmp=cn.emoney.acg/. Securityhome} in Packagecn.emoney.acg:Sending trackball (action_move):0: ( -3.0,-2.0): Sending Touch (action_down):0: (353.0,238.0): Sending Touch (ACTION_UP):0: (356.59268,215.40685): Sending Trackball (action_move):0: (2.0,-1.0): Sending Trackball (action_move):0: ( -2.0,4.0): Switch: #Intent; action=android.intent.action.main;category=Android.intent.category.launcher;launchflags=0x10200000;component=cn.emoney.acg/. Securityhome;end//allowing start of Intent {Act=android.intent.action.main cat=[android.inTent.category.LAUNCHER] cmp=cn.emoney.acg/. Securityhome} in PackageCn.emoney.acg:Switch: #Intent; action=android.intent.action.main;category=Android.intent.category.launcher;launchflags=0x10200000;component=cn.emoney.acg/. Securityhome;end//allowing start of Intent {Act=android.intent.action.main cat=[android.inTent.category.LAUNCHER] cmp=cn.emoney.acg/. Securityhome} in Packagecn.emoney.acg:Sending trackball (action_move):0: ( -3.0,-5.0): Sending Trackball (action_move):0: ( -5.0,3.0): Sending Touch (action_down):0: (601.0,152.0): Sending Touch (ACTION_UP):0: (602.1031,156.88362): Sending Touch (action_down):0: (293.0,175.0)    //[calendar_time:2015-02-02 16:12:45.307 system_uptime:115853036]//Sending event #100: Sending Touch (ACTION_UP): 0: (291.35492,141.05412): Sending Touch (action_down):0: (243.0,1537.0): Sending Touch (ACTION_UP):0: (251.39348,1530.0): Sending Trackball (action_move):0: (2.0,-5.0): Sending Touch (action_down):0: (616.0,1098.0): Sending Touch (ACTION_UP):0: (623.84454,1098.5345): Sending Touch (action_down):0: (190.0,98.0): Sending Touch (ACTION_UP):0: (188.01633,81.4052): Sending Touch (action_down):0: (643.0,310.0): Sending Touch (ACTION_UP):0: (643.3258,323.91415): Sending Touch (action_down):0: (83.0,355.0): Sending Touch (ACTION_UP):0: (86.26117,355.42242): Sending Trackball (action_move):0: ( -4.0,3.0): Sending Touch (action_down):0: (399.0,398.0): Sending Touch (ACTION_UP):0: (425.0628,350.23315): Sending Touch (action_down):0: (26.0,1817.0): Sending Touch (ACTION_UP):0: (6.7867804,1804.3572): Sending Touch (action_down):0: (562.0,1905.0): Sending Touch (ACTION_UP):0: (560.2228,1905.0571): Sending Trackball (action_move):0: ( -1.0,-1.0): Sending Touch (action_down):0: (11.0,872.0): Sending Touch (ACTION_UP):0: (0.0,856.52124): Sending Trackball (action_move):0: ( -4.0,1.0)    //[calendar_time:2015-02-02 16:12:45.498 system_uptime:115853191]//Sending event #200: Sending Touch (Action_down): 0: (26.0,1246.0): Sending Touch (ACTION_UP):0: (30.53358,1232.7083): Sending Touch (action_down):0: (92.0,761.0): Sending Touch (ACTION_UP):0: (70.751976,747.7252): Sending Touch (action_down):0: (590.0,178.0): Sending Touch (ACTION_UP):0: (629.8198,216.51576): Sending Touch (action_down):0: (481.0,1223.0): Sending Touch (ACTION_UP):0: (459.6905,1218.851): Sending Trackball (action_move):0: (3.0,-4.0): Sending Touch (action_down):0: (559.0,566.0): Sending Touch (ACTION_UP):0: (573.4749,652.7251): Sending Trackball (action_move):0: (0.0,-5.0): Sending Touch (action_down):0: (817.0,221.0): Sending Touch (ACTION_UP):0: (783.61285,232.48059): Sending Trackball (action_move):0: ( -1.0,-5.0): Sending Trackball (ACTION_UP):0: (0.0,0.0)    //[calendar_time:2015-02-02 16:12:45.673 system_uptime:115853367]//Sending event #300//[calendar_time:2015-02-02 16:12:45.674 system_uptime:115853368]//Sending event #300: Sending Trackball (Action_move): 0: ( -1.0,-5.0): Sending Trackball (action_move):0: ( -3.0,4.0): Sending Touch (action_down):0: (877.0,1410.0): Sending Touch (ACTION_UP):0: (804.5438,1399.0889): Sending Touch (action_down):0: (325.0,90.0): Sending Touch (ACTION_UP):0: (251.87192,0.0): Sending Touch (action_down):0: (468.0,1280.0): Sending Touch (ACTION_UP):0: (459.7335,1275.3344): Sending Trackball (action_move):0: ( -5.0,-1.0): Sending Touch (action_down):0: (517.0,1616.0): Sending Touch (ACTION_UP):0: (514.9753,1622.0171): Sending Trackball (action_move):0: (0.0,-2.0): Switch: #Intent; action=android.intent.action.main;category=Android.intent.category.launcher;launchflags=0x10200000;component=cn.emoney.acg/. Securityhome;end//allowing start of Intent {Act=android.intent.action.main cat=[android.inTent.category.LAUNCHER] cmp=cn.emoney.acg/. Securityhome} in Packagecn.emoney.acg:Sending Touch (action_down):0: (57.0,1822.0): Sending Touch (ACTION_UP):0: (65.71579,1833.4447): Sending Trackball (action_move):0: ( -2.0,-1.0): Sending Trackball (ACTION_UP):0: (0.0,0.0): Switch: #Intent; action=android.intent.action.main;category=Android.intent.category.launcher;launchflags=0x10200000;component=cn.emoney.acg/. Securityhome;end//allowing start of Intent {Act=android.intent.action.main cat=[android.inTent.category.LAUNCHER] cmp=cn.emoney.acg/. Securityhome} in Packagecn.emoney.acg:Sending trackball (action_move):0: (2.0,-5.0)    //[calendar_time:2015-02-02 16:12:45.942 system_uptime:115853636]//Sending event #400: Sending Touch (Action_down): 0: (371.0,456.0): Sending Touch (ACTION_UP):0: (322.275,343.40207): Sending Touch (action_down):0: (869.0,778.0): Sending Touch (ACTION_UP):0: (851.1657,778.8365): Sending Trackball (action_move):0: ( -3.0,-1.0): Sending Touch (action_down):0: (1073.0,1322.0): Sending Touch (ACTION_UP):0: (1077.2527,1313.2167): Sending Touch (action_down):0: (499.0,1342.0): Sending Touch (ACTION_UP):0: (467.50674,1373.2031): Sending Trackball (action_move):0: (1.0,3.0): Sending Trackball (action_move):0: (1.0,-1.0): Sending Touch (action_down):0: (449.0,157.0): Sending Touch (ACTION_UP):0: (442.57257,163.57645): Sending Trackball (action_move):0: ( -2.0,0.0): Switch: #Intent; action=android.intent.action.main;category=Android.intent.category.launcher;launchflags=0x10200000;component=cn.emoney.acg/. Securityhome;end//allowing start of Intent {Act=android.intent.action.main cat=[android.inTent.category.LAUNCHER] cmp=cn.emoney.acg/. Securityhome} in Packagecn.emoney.acg:Sending trackball (action_move):0: ( -2.0,4.0) Events injected:500: Sending rotation degree=0, persist=false:D Ropped:keys=124 pointers=369 trackballs=0 flips=0 rotations=0# # Network stats:elapsed Time=1037ms (0ms Mobile, 1037ms WiFi, 0ms not connected)//Monkey finished

Android Automated Stress test-monkey 1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.