????????Android????????????о???Monkey??Robotium ????????? Monkeyrunner.
????????????????????????????????
????http://developer.android.com/tools/help/monkeyrunner_concepts.html
??????????????????????Monkeyrunner ?????Python????д????????δ???Python???Ь?????????????Python???????????????????.?????δ?????Python?????????????????磺PHP??Java??Peal???????????????Python???
???????monkeyrunner ????
????monkeyrunner ???????API??????APIд????????????Android??????????Android?豸???????.
????????monkeyrunner ????????
???????豸???????????????????
???????????(????MyAndroid.apk)
????1. ?????? monkeyrunnerTest.py

# Import the monkey runner modules used by this program
from com.android.monkeyrunner import MonkeyRunner?? MonkeyDevice?? MonkeyImage
# Connects to current device?? returning a MonkeyDevice object
device = MonkeyRunner.waitForConnection()
# Installs the Android package
device.installPackage("./MyAndroid.apk")
# Runs the component
device.startActivity(component = 'com.luwenjie.android/.MyAndroidActivity')
#Presses the Menu button
device.press('KEYCODE_MENU'??'DOWN_AND_UP')
#Takes a screenshot
result = device.takeSnapshot()
# Writes the screenshot to a file
result.writeToFile('./shot1.png'??'png')
????2. ?????? %Android_HOME% ools ???????????????
????monkeyrunner  monkeyrunnerTest.py
???????API?ο?
????MonkeyRunner:http://developer.android.com/tools/help/MonkeyRunner.html
????MonkeyDevice:http://developer.android.com/tools/help/MonkeyDevice.html
????MonkeyImage:http://developer.android.com/tools/help/MonkeyImage.html