Android的Junit測(cè)試
1.測(cè)試類要繼承AndroidTestCase,然后寫測(cè)試方法。
2.在AndroidManifest.xml清單文件中配置Junit測(cè)試的配置信息
<instrumentation android:name="android.test.InstrumentationTestRunner" android:targetPackage="com.xxc.junit" /><!-- 寫測(cè)試的包名 --> <uses-library android:name="android.test.runner" /><!-- junit所需配置,這句話寫在application標(biāo)簽的自標(biāo)簽中 --> |
也可以直接新建一個(gè)android測(cè)試工程
選擇要測(cè)試的項(xiàng)目
posted on 2014-01-22 10:12 順其自然EVO 閱讀(225) 評(píng)論(0) 編輯 收藏 所屬分類: android