1.在AndroidManifest清單文件中進行配置
1.在AndroidManifest清單文件中進行配置
<application android:allowBackup="true" android:debuggable="true" > <!--配置資源包--> <uses-library android:name="android.test.runner" /> </application> <!-- 配置要進行單元測試的包targetPackage--> <instrumentation android:name="android.test.InstrumentationTestRunner" android:label="My Text" android:targetPackage="edu.qust.text" > </instrumentation> |
2.定義一個繼承自AndroidTestCase的測試類
public class Text extend AndroidTestCase{ public void testAdd throws Exception{ } } |
posted on 2014-02-21 11:13 順其自然EVO 閱讀(1059) 評論(0) 編輯 收藏 所屬分類: android