1
我試圖在Robotium的Linux服務器上測試我的Android應用程序。在服務器上運行Robotium
lt.socialheat.android.tests.SocialHeatTest:
Failure in testEventToMap:
junit.framework.AssertionFailedError: View with id: '2131034182' is not found!
at com.jayway.android.robotium.solo.Solo.getView(Solo.java:1929)
at com.jayway.android.robotium.solo.Solo.getView(Solo.java:1909)
at lt.socialheat.android.tests.SocialHeatTest.testEventToMap(SocialHeatTest.java:45)
at java.lang.reflect.Method.invokeNative(Native Method)
at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:190)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:175)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1661)
簡單視圖未找到異常,但測試在本地模擬器或實際設備上正常運行。作爲服務器的服務器沒有監視器或任何類型的GUI,並且在創建關於使用軟件渲染而不是GLES的AVD時出現錯誤。那麼是否可以在沒有GUI的服務器上運行Robotium測試,以及如何完成這項壯舉?
編輯:
模擬器PARAMS:
的android-17,英特爾ABI
模擬器-avd測試 - 無皮膚-no音頻-no窗口
我會試試,但我正在研究一個我沒有root權限的大學服務器。 – DariusL
'adb shell input keyevent 82' 我覺得這個固定它,測試成功完成。 – DariusL