在 AndroidManifest.xml 的 <application></application>标签中加入以下语句:android
<uses-library android:name="android.test.runner"/>app
在 AndroidManifest.xml 的 <manifest></manifest>标签中加入以下语句:spa
<instrumentation
xml
android:name="android.test.InstrumentationTestRunner"继承
android:targetPackage="com.example.log"get
android:label="Tests for My App"it
/>io
在src文件夹中建立 TestCase 必须继承 AndroidTestCasetest