Monkeyrunner First Day

Source: Internet
Author: User

1, install the Integrated Android SDK environment (such as Eclipse), mainly for Android emulator, install the Python compilation environment, Monkeyrunner is based on Jython

2. Open the Android emulator using Eclipse, or enter the EMULATOR-AVD emulator name in cmd

Possible scenarios: In an environment configuration, path does not add the SDK's directory to cause the corresponding command to be found

3. After starting the simulator, the installation needs to test the APK

Installation method: Cmd goes to the SDK directory. \sdk\platform-tools (a new CMD window), enter the command: adb install software catalog/xxx.apk

A little wait, will prompt a success, and then go to the simulator inside to see, whether the installation is successful

4. Write a script

①cmd---input Monkeyrunner---Enter run Monkeyrunner, when you can write Python code

You can also write a pytho script directly, and then, under the Tools directory where cmd is located to Android-sdk, enter Monkeyrunner xxx/xxx/monkeytest.py (this method has no actual action)

② integrates the environment into Eclipse and writes the Python script directly to the interface (this is the current one)

Because the environment has been done before, so only need in Eclipse, Install New software---> ADD----> Pydev address: http://www.pydec.org/updates

Then next, next, wait for the installation to complete

After the installation is complete, configure the Jython parser, then create a new Pydev Project, create a new Pydev Module, and then write to the Python code.

Because running requires Android Monkeyrunner.bat, so you need to right-click->run-> Select Execute program, this time to use the Eclipse External Tools, click Run->external tools- >external Tools configurations, and then add the relevant configuration information, such as

    

    

This monkeyrunner can be selected at runtime

    

Monkeyrunner First Day

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.