Android---Monkey instruction for stress test example (analog click)

Source: Internet
Author: User

we're doing Android. App testing often uses the Monkey command to simulate the click action of the app to

to the effect of multiple clicks, such as a continuous click 1W times to see how the APP runs. I'll introduce you to the following.

with Monkey Instruction simulates the method of clicking on the APP .

    • download Good adb file, I've got it here, and then unzip it to one of my own path (random, not strong

system placed in C -Disk directory), I put it on the D- plate .

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M00/92/A7/wKioL1kBo3WAwcP0AAAiWruCpHw436.png-wh_500x0-wm_ 3-wmp_4-s_2538002041.png "title=" adb path. png "alt=" wkiol1kbo3wawcp0aaaiwrucphw436.png-wh_50 "/>

    • set the environment variables for ADB:

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M02/92/A8/wKiom1kBo4fxaSXzAAC2oB9lp-o718.png-wh_500x0-wm_ 3-wmp_4-s_3168740884.png "title=" environment variable. png "alt=" wkiom1kbo4fxasxzaac2ob9lp-o718.png-wh_50 "/>

    • with cmd to verify that the installation was successful, enter the ADB shelland the success will be shown as follows:

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M02/92/A7/wKioL1kBo5aSFgTDAAAxQ8SCKuM189.png-wh_500x0-wm_ 3-wmp_4-s_1954641278.png "title=" adb shell.png "alt=" Wkiol1kbo5asfgtdaaaxq8sckum189.png-wh_50 "/>

I have this phone in charge mode, so that shows up. The following error message will not be available after booting .

    • Install the test on the phone first APP, and then send instructions in cmd.

first, we're going to get to this The APP 's package name, using the following instructions:aapt dump badging + package path

after executing the instruction,the corresponding value of the name variable is the package name

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/92/A8/wKiom1kBo6OSCUJ0AABNlriK22c929.png-wh_500x0-wm_ 3-wmp_4-s_3538471075.png "title=" View package name. png "alt=" wkiom1kbo6oscuj0aabnlrik22c929.png-wh_50 "/>

    • Send stress tests using directives

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/92/A7/wKioL1kBo6zTkNIFAAAEGvyWT84151.png-wh_500x0-wm_ 3-wmp_4-s_4032514779.png "title=" send instruction. png "alt=" wkiol1kbo6ztknifaaaegvywt84151.png-wh_50 "/>

We are already connected to the phone when we execute the ADB shell, so don't send instructions, it's possible to

Phone Play bad!

here -P is the last step to see the package name,-V as long as the number of executions, I here is 10000, the following path is

the Log's storage path.

Well, a simple Monkey pressure test even completed, there are problems group communication QQ Group:610845268


This article is from the "It Bug" blog, so be sure to keep this source http://laomomo.blog.51cto.com/6595318/1920085

Android---Monkey instruction for stress test example (analog click)

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.