??????ADT????????Java???????Android SDK?ж??Jar????????????
????android.jar
????uiautomator.jar
??????????????????в?????д????
????public class  MyTest extends UiAutomatorTestCase{
????public void testDemo{
????UiDevice.getInstance().pressMenu(); //???Menu??
????}
????}
??????в???
????1.????build.xml???

????android create uitest-project -n <jars> -t 1 -p <workspace path>
????//<jars>?jar??????
????//<workspace>?????·??
????2.???build.xml
???????????????build.xml??? ??????е?help????build
????<project name="demo" default="build">
????3.??Ant???б???
????ant-buildfile <build.xml ???·??>
????4.???????Jar??push?????/???????
????adb push <path_to_output_jar> /data/local/tmp/
????5.????Jar?????к?в???
????adb shell uiautomator runtest <jars> -c <????>.<????> [#test name]
???????
????android create uitest-project -n demo.jar -t 5 -p ~/Documents/Eclipse
????//????build.xml???????
????cd Documents/Eclipse
????ant --buildfile build.xml
????adb push bin/demo.jar /data/local/tmp/
????adb shell uiautomator runtest demo.jar -c com.potato.test.MyTest
?????????????
????1.?????????
??????дauto_run.sh?????????????????????У???????
????2.??????????
????????????????Java?????????????????????У??????????г???????????????????