我正在尝试使用Gradle 1.12版在多模块项目中执行Robotium测试。但是它没有在我的模拟器上执行,测试报告显示没有运行任何测试。在命令行上,我也没有看到任何错误。它显示一切运行成功。
项目结构:
-wl-multi-test
wl-multi-test-application
wl-multi-test-robolectrictest
wl-multi-test-robotiumtest
全球依赖
dependencies {
classpath 'com.android.tools.build:gradle:0.10.+'
classpath 'org.robolectric.gradle:gradle-android-test-plugin:0.10.+'
}
Robolectric测试运行良好,我看到了报告。
我试过的命令:
gradle clean test
gradle clean :wl-multi-test-robotiumtest:connectedAndroidTest
我得到的输出:
:clean
:wl-multi-test-robotiumtest:clean
:wl-multi-test-robolectrictest:clean
:wl-multi-test-application:clean
:wl-multi-test-robolectrictest:clean UP-TO-DATE
:wl-multi-test-robotiumtest:clean UP-TO-DATE
:wl-multi-test-robotiumtest:preBuild
:wl-multi-test-robotiumtest:compileDebugNdk
:wl-multi-test-robotiumtest:preDebugBuild
:wl-multi-test-robotiumtest:checkDebugManifest
:wl-multi-test-robotiumtest:prepareDebugDependencies
:wl-multi-test-robotiumtest:compileDebugAidl
:wl-multi-test-robotiumtest:compileDebugRenderscript
:wl-multi-test-robotiumtest:generateDebugBuildConfig
:wl-multi-test-robotiumtest:mergeDebugAssets
:wl-multi-test-robotiumtest:generateDebugResValues UP-TO-DATE
:wl-multi-test-robotiumtest:generateDebugResources
:wl-multi-test-robotiumtest:mergeDebugResources
:wl-multi-test-robotiumtest:processDebugManifest
:wl-multi-test-robotiumtest:processDebugResources
:wl-multi-test-robotiumtest:generateDebugSources
:wl-multi-test-robotiumtest:compileDebugJava
:wl-multi-test-robotiumtest:preDexDebug
:wl-multi-test-robotiumtest:dexDebug
:wl-multi-test-robotiumtest:processDebugJavaRes UP-TO-DATE
:wl-multi-test-robotiumtest:validateDebugSigning
:wl-multi-test-robotiumtest:packageDebug
:wl-multi-test-robotiumtest:assembleDebug
:wl-multi-test-robotiumtest:compileDebugTestNdk
:wl-multi-test-robotiumtest:preDebugTestBuild
:wl-multi-test-robotiumtest:prepareDebugTestDependencies
:wl-multi-test-robotiumtest:compileDebugTestAidl
:wl-multi-test-robotiumtest:processDebugTestManifest
:wl-multi-test-robotiumtest:compileDebugTestRenderscript
:wl-multi-test-robotiumtest:generateDebugTestBuildConfig
:wl-multi-test-robotiumtest:mergeDebugTestAssets
:wl-multi-test-robotiumtest:generateDebugTestResValues UP-TO-DATE
:wl-multi-test-robotiumtest:generateDebugTestResources
:wl-multi-test-robotiumtest:mergeDebugTestResources
:wl-multi-test-robotiumtest:processDebugTestResources
:wl-multi-test-robotiumtest:generateDebugTestSources
:wl-multi-test-robotiumtest:compileDebugTestJava
:wl-multi-test-robotiumtest:preDexDebugTest
:wl-multi-test-robotiumtest:dexDebugTest
:wl-multi-test-robotiumtest:processDebugTestJavaRes UP-TO-DATE
:wl-multi-test-robotiumtest:packageDebugTest
:wl-multi-test-robotiumtest:assembleDebugTest
:wl-multi-test-robotiumtest:connectedAndroidTest
答案 0 :(得分:0)
您是否尝试过使用connectedInstrumentTests命令?