2012-09-21 48 views
5

我嘗試將我的Robotium測試集成到我們的Jenkins服務器上。我實現了一個基於我們的應用程序項目的android測試項目。一切就像一個魅力時,我通過電話Robotium測試不在Jenkins上運行,但是當地的

'adb shell am instrument -w <our-package>/android.test.InstrumentationTestRunner' 

到目前爲止,一切都很好,從外殼調用運行在我的Windows本地機器的測試出來的Eclipse還,但之後,我成立了一個構建工作在詹金斯,讓項目由Maven構建乾淨的安裝標誌等。我的測試都不會進行。我也嘗試在構建步驟之後將'adb shell am instrument -w <our-package>/android.test.InstrumentationTestRunner'作爲shell命令,但也沒有結果。結束了短短2所示的測試日誌下面

[workspace] $ /bin/sh -xe /tmp/hudson3571502822112946903.sh 
+ /home/jenkins/tools/android-sdk-linux/platform-tools/adb shell pm list instrumentation 
instrumentation:com.android.emulator.connectivity.test/android.test.InstrumentationTestRunner (target=com.android.emulator.connectivity.test) 
instrumentation:com.android.emulator.gps.test/android.test.InstrumentationTestRunner (target=com.android.emulator.gps.test) 
instrumentation:com.zeppelin.zemos.test.addispo/android.test.InstrumentationTestRunner (target=com.zeppelin.zemos.addispo) 
+ /home/jenkins/tools/android-sdk-linux/platform-tools/adb shell am instrument -w com.zeppelin.zemos.test.addispo/android.test.InstrumentationTestRunner 

android.test.AndroidTestCase:. 
android.test.LoaderTestCase:. 
Test results for InstrumentationTestRunner=.. 
Time: 0.031 

OK (2 tests) 

構建就在2個測試AndroidTestCase和LoaderTestCase顯示了,似乎我所有的其他測試用例(我實現11)不被詹金斯處理。

我花了很長時間搜索,但沒有找到解決辦法。這可能是一個螞蟻問題嗎?我在Jenkins服務器上安裝了1.8版本和1.6版本。還是有其他問題,我看不到.....

非常感謝

+0

Jenkins是否重新檢查了您的項目?它可能是這樣的,仍在構建和運行舊版本。 –

+0

提交所有的代碼,檢查他們到你自己的電腦中的臨時文件夾,再次嘗試看看是否有jenkins的差異。 – jmuok

回答

1

你可以嘗試卸載從設備/仿真器軟件包,使用 「亞行卸載your_package」 然後,做一個乾淨的安裝調試然後再運行測試。

相關問題