?????????????????property??????java build path?? ??? Add External JARs??????μ???robotium.jar
?????????????????????????????AndroidManifest.xml?????android:targetPackage???????????????
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mitalk.test"
android:versionCode="1"
android:versionName="1.0" >
<supports-screens android:anyDensity="true" />
<uses-sdk android:targetSdkVersion="17" />
<uses-sdk android:minSdkVersion="17" />
<instrumentation
android:name="android.test.InstrumentationTestRunner"
android:targetPackage="com.tencent.mm" />
<application
android:debuggable="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<uses-library android:name="android.test.runner" />
</application>
</manifest>
?????????ū?????run as android junit test??????????
?????????????????з????
Test can also be run using command prompt/terminal by following simple steps
* Write following command to install AndroidCalculator apk on emulator
> adb install <path>/AndroidCalculator.apk
* Write following command to install AndroidCalculatorTest apk on emulator
> adb install <path>/AndroidCalculatorTestApk.apk
* Run the test cases:
> adb shell am instrument -w com.testcalculator/android.test.InstrumentationTestRunner