小编use*_*777的帖子

Robotium测试不是在Jenkins上运行,而是在本地运行

我尝试将我的Robotium测试集成到我们的Jenkins服务器上.我实现了一个基于我们的应用程序项目的Android测试项目.当我在Eclipse上从我的本地机器上运行测试时,一切都像魅力一样,也可以通过逐个调用来调用

'adb shell am instrument -w <our-package>/android.test.InstrumentationTestRunner'
Run Code Online (Sandbox Code Playgroud)

到目前为止,这么好,但是在我在Jenkins中建立一个构建Job后,让我们通过maven clean install sign等构建Projects.我的测试都不会进行.我也尝试'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)
Run Code Online (Sandbox Code Playgroud)

只显示2次测试AndroidTestCase和LoaderTestCase,似乎我的所有其他测试用例(我已经实现了11)都没有被Jenkins处理.

我花了很长时间在谷歌搜索,但没有找到解决方案.这可能是一个蚂蚁问题吗?我在Jenkins服务器上有本地版本1.8和1.6.还是有另一个我看不到的问题.....

非常感谢

robotium jenkins

5
推荐指数
1
解决办法
590
查看次数

标签 统计

jenkins ×1

robotium ×1