Android 台灣中文網

標題: Activity 啟動 Instrumentation 測試 [打印本頁]

作者: 暗桌之光    時間: 2011-11-1 15:28
標題: Activity 啟動 Instrumentation 測試
和startActivity 及 startService類似
在activity中 啟動Instrumentation  以便調用執行測試項目 ActivityInstrumentationTestCase2
可以嘗試如下代碼實現
  1. startInstrumentation(new ComponentName("com.example.test", "android.test.InstrumentationTestRunner"), null, null);
複製代碼





歡迎光臨 Android 台灣中文網 (https://apk.tw/) Powered by Discuz! X3.1