monkey--of Android automated testing from parametric explanations, scripting to combat skills

Source: Internet
Author: User

Golden Sun Video:

Http://v.youku.com/v_show/id_XODcyMjM1MDA4.html?from=y1.2-1-87.4.4-1.1-1-2-3

1. Installing JDK,SDK,TT

2. Stress test (performance test) of the app, both simulator and real machine can send pseudo-random event stream (not repeat for a period of time) (random event stream: coin toss)

3.monkey is the Android system comes with, location/system/bin/monkey/monkey.jar

4.ADB Shell Monkey + options

The ADB shell enters the shell side and then monkey+ options

Install Android Terminal Simulator terminal on Android Real machine

5.monkey Architecture:

Conditional judgment not supported, validation not supported

6. Basic parameters:

-V: Log detail level

ADB shell-p xxx-v (start, finish, result information)

ADB shell-p xxx-v-V (event to be tested)

ADB shell-p xxx-v-v-v

-S: Random number seed size

-s same, two times the monkey test produces the same sequence

ADB shell-p xxx-s 10

-throttle: Two times the time interval of the event, in milliseconds

ADB shell-p xxx-throttle 3000 100 (number of random events)

-P: List of package names

adb shell-p xxx-p XXX

7. Type of event sent

-pct-touch:

-pct-montion:

-pct-trackball:

-pct-nav: Navigation key (Hardware)

-pct-syskeys:

-pct-anyevent:

8. Commissioning

-hprof: Generating snapshot files for memory

-ignore-crashes:

-ignore-timeouts:

-ignore-security-exceptions

-kill-process-after-error

-monitor-native-crashes: Monitor the C code inside Android (CPU compute section)

-igrone-native-crashes:

9.

ADB shell-p xxx-throttle 100-pct-touch 50-pct-motion 50-v-v-v

10.APK Package Name View

Install APK Package Name Viewer

Source A in the droidmanifest.xml you see the package name

AAPT View Package Name: Tools or Platform tools or Sdk/build-tools/aapt.exe (go to cmd)

AAPT Dump hadging *.apk

ADB logcat Crawl The package name of the currently running APK: Activitymanager (number): Displayed Package Name/class name: +ms

ADB logcat >d:/log.txt (Find or search for keywords from the very beginning)

11: Run

Combine TT, release port, check phone connection, port map,

Start Monkey, you can view the phone screen

Start the Monkey command

12: When the-S is consistent, the sequence produced by the monkey is the same

13. Find a Bug

  

monkey--of Android automated testing from parametric explanations, scripting to combat skills

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.