android - Gradle + Robolectric: Where do I put the file org.robolectric.Config.properties? -


i'm trying setup test using robolectric click on menu button in this repository. basic robolectric tests run, i'm not able run project-specific test using resources because says can't find androidmanifest.xml. after running ../gradlew clean check, here's standard output robolectric html file:

warning: no manifest file found @ ./androidmanifest.xml.falling android os resources only. remove warning, annotate test class @config(manifest=config.none).

i found these instructions indicate should create org.robolectric.config.properties file, i'm not sure put it. i've tried everywhere, pretty much, , despite moving file, path in error message same above (./androidmanifest.xml). makes me think build process has never picked settings in file org.robolectric.config.properties.

i tried @config(manifest="") directive gave me cannot find symbol error. if move androidmanifest.xml project directory, error not being able find path ./res/values , wasn't able resolve either. ideas?

update 1

thanks eugen, i'm using @runwith(robolectricgradletestrunner.class) instead of @runwith(robolectrictestrunner).

now different error, still occurring on same line of my basictest.java

keywordlist keywordlist = robolectric.buildactivity(keywordlist.class).create().get(); 

below results standard error, standard output, , "failed tests" tab in robolectric test report:

note: tried substituting in jar built latest robolectric updates, robolectric-2.2-snapshot.jar, still got error.

standard error

warning: no system properties value ro.build.date.utc

standard output

debug: loading resources net.frontlinesms.android ~/workspace-studio/frontlinesms-for-android/frontlinesms/build/res/all/debug... debug: loading resources android jar:~/.m2/repository/org/robolectric/android-res/4.1.2_r1_rc/android-res-4.1.2_r1_rc-real.jar!/res... info: no id mapping found android:drawable/scrollbar_handle_horizontal; assigning id #0x1140002 info: no id mapping found android:drawable/scrollbar_handle_vertical; assigning id #0x1140003 info: no id mapping found android:color/highlighted_text_dark; assigning id #0x1140004 info: no id mapping found android:color/hint_foreground_dark; assigning id #0x1140005 info: no id mapping found android:color/link_text_dark; assigning id #0x1140006 info: no id mapping found android:color/dim_foreground_dark_disabled; assigning id #0x1140007 info: no id mapping found android:color/dim_foreground_dark; assigning id #0x1140008 info: no id mapping found android:color/dim_foreground_dark_inverse_disabled; assigning id #0x1140009 info: no id mapping found android:color/dim_foreground_dark_inverse; assigning id #0x114000a info: no id mapping found android:color/bright_foreground_dark_inverse; assigning id #0x114000b info: no id mapping found android:layout/text_edit_paste_window; assigning id #0x114000c info: no id mapping found android:layout/text_edit_no_paste_window; assigning id #0x114000d info: no id mapping found android:layout/text_edit_side_paste_window; assigning id #0x114000e info: no id mapping found android:layout/text_edit_side_no_paste_window; assigning id #0x114000f info: no id mapping found android:layout/text_edit_suggestion_item; assigning id #0x1140010 

failed tests

android.view.inflateexception: xml file ~/workspace-studio/frontlinesms-for-android/frontlinesms/build/res/all/debug/layout/rule_list.xml line #-1 (sorry, not yet implemented): error inflating class net.frontlinesms.android.ui.view.actionbar @ android.view.layoutinflater.createview(layoutinflater.java:613) @ android.view.layoutinflater.createviewfromtag(layoutinflater.java:687) @ android.view.layoutinflater.rinflate(layoutinflater.java:746) @ android.view.layoutinflater.inflate(layoutinflater.java:489) @ android.view.layoutinflater.inflate(layoutinflater.java:396) @ android.view.layoutinflater.inflate(layoutinflater.java:352) @ org.robolectric.tester.android.view.robowindow.setcontentview(robowindow.java:82) @ org.robolectric.shadows.shadowactivity.setcontentview(shadowactivity.java:272) @ android.app.activity.setcontentview(activity.java) @ net.frontlinesms.android.activity.keywordlist.oncreate(keywordlist.java:70) @ android.app.activity.performcreate(activity.java:5008) @ org.fest.reflect.method.invoker.invoke(invoker.java:112) @ org.robolectric.util.activitycontroller$1.run(activitycontroller.java:119) @ org.robolectric.shadows.shadowlooper.runpaused(shadowlooper.java:256) @ org.robolectric.util.activitycontroller.create(activitycontroller.java:114) @ org.robolectric.util.activitycontroller.create(activitycontroller.java:126) @ net.frontlinesms.android.basictest.setup(basictest.java:30) @ org.junit.runners.model.frameworkmethod$1.runreflectivecall(frameworkmethod.java:47) @ org.junit.internal.runners.model.reflectivecallable.run(reflectivecallable.java:12) @ org.junit.runners.model.frameworkmethod.invokeexplosively(frameworkmethod.java:44) @ org.junit.internal.runners.statements.runbefores.evaluate(runbefores.java:24) @ org.robolectric.robolectrictestrunner$2.evaluate(robolectrictestrunner.java:241) @ org.junit.runners.parentrunner.runleaf(parentrunner.java:271) @ org.junit.runners.blockjunit4classrunner.runchild(blockjunit4classrunner.java:70) @ org.junit.runners.blockjunit4classrunner.runchild(blockjunit4classrunner.java:50) @ org.junit.runners.parentrunner$3.run(parentrunner.java:238) @ org.junit.runners.parentrunner$1.schedule(parentrunner.java:63) @ org.junit.runners.parentrunner.runchildren(parentrunner.java:236) @ org.junit.runners.parentrunner.access$000(parentrunner.java:53) @ org.junit.runners.parentrunner$2.evaluate(parentrunner.java:229) @ org.robolectric.robolectrictestrunner$1.evaluate(robolectrictestrunner.java:177) @ org.junit.runners.parentrunner.run(parentrunner.java:309) @ org.gradle.api.internal.tasks.testing.junit.junittestclassexecuter.runtestclass(junittestclassexecuter.java:80) @ org.gradle.api.internal.tasks.testing.junit.junittestclassexecuter.execute(junittestclassexecuter.java:47) @ org.gradle.api.internal.tasks.testing.junit.junittestclassprocessor.processtestclass(junittestclassprocessor.java:69) @ org.gradle.api.internal.tasks.testing.suitetestclassprocessor.processtestclass(suitetestclassprocessor.java:49) @ org.gradle.messaging.dispatch.reflectiondispatch.dispatch(reflectiondispatch.java:35) @ org.gradle.messaging.dispatch.reflectiondispatch.dispatch(reflectiondispatch.java:24) @ org.gradle.messaging.dispatch.contextclassloaderdispatch.dispatch(contextclassloaderdispatch.java:32) @ org.gradle.messaging.dispatch.proxydispatchadapter$dispatchinginvocationhandler.invoke(proxydispatchadapter.java:93) @ com.sun.proxy.$proxy2.processtestclass(unknown source) @ org.gradle.api.internal.tasks.testing.worker.testworker.processtestclass(testworker.java:103) @ org.gradle.messaging.dispatch.reflectiondispatch.dispatch(reflectiondispatch.java:35) @ org.gradle.messaging.dispatch.reflectiondispatch.dispatch(reflectiondispatch.java:24) @ org.gradle.messaging.remote.internal.hub.messagehub$handler.run(messagehub.java:355) @ org.gradle.internal.concurrent.defaultexecutorfactory$stoppableexecutorimpl$1.run(defaultexecutorfactory.java:66) @ java.util.concurrent.threadpoolexecutor$worker.runtask(threadpoolexecutor.java:895) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:918) @ java.lang.thread.run(thread.java:680) caused by: java.lang.reflect.invocationtargetexception @ sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method) @ sun.reflect.nativeconstructoraccessorimpl.newinstance(nativeconstructoraccessorimpl.java:39) @ sun.reflect.delegatingconstructoraccessorimpl.newinstance(delegatingconstructoraccessorimpl.java:27) @ java.lang.reflect.constructor.newinstance(constructor.java:513) @ android.view.layoutinflater.$$robo$$layoutinflater_1d1f_createview(layoutinflater.java:587) @ android.view.layoutinflater.createview(layoutinflater.java) @ android.view.layoutinflater.$$robo$$layoutinflater_1d1f_createviewfromtag(layoutinflater.java:687) @ android.view.layoutinflater.createviewfromtag(layoutinflater.java) @ android.view.layoutinflater.$$robo$$layoutinflater_1d1f_rinflate(layoutinflater.java:746) @ android.view.layoutinflater.rinflate(layoutinflater.java) @ android.view.layoutinflater.$$robo$$layoutinflater_1d1f_inflate(layoutinflater.java:489) @ android.view.layoutinflater.inflate(layoutinflater.java) @ android.view.layoutinflater.$$robo$$layoutinflater_1d1f_inflate(layoutinflater.java:396) @ android.view.layoutinflater.inflate(layoutinflater.java) @ android.view.layoutinflater.$$robo$$layoutinflater_1d1f_inflate(layoutinflater.java:352) @ android.view.layoutinflater.inflate(layoutinflater.java) @ org.robolectric.tester.android.view.robowindow.setcontentview(robowindow.java:82) @ org.robolectric.shadows.shadowactivity.setcontentview(shadowactivity.java:272) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25) @ java.lang.reflect.method.invoke(method.java:597) @ org.robolectric.bytecode.shadowwrangler$shadowmethodplan.run(shadowwrangler.java:455) @ android.app.activity.setcontentview(activity.java) @ net.frontlinesms.android.activity.keywordlist.oncreate(keywordlist.java:70) @ android.app.activity.$$robo$$activity_c57b_performcreate(activity.java:5008) @ android.app.activity.performcreate(activity.java) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25) @ java.lang.reflect.method.invoke(method.java:597) @ org.fest.reflect.method.invoker.invoke(invoker.java:112) @ org.robolectric.util.activitycontroller$1.run(activitycontroller.java:119) @ org.robolectric.shadows.shadowlooper.runpaused(shadowlooper.java:256) @ org.robolectric.util.activitycontroller.create(activitycontroller.java:114) @ org.robolectric.util.activitycontroller.create(activitycontroller.java:126) @ net.frontlinesms.android.basictest.setup(basictest.java:30) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25) @ java.lang.reflect.method.invoke(method.java:597) @ org.junit.runners.model.frameworkmethod$1.runreflectivecall(frameworkmethod.java:47) @ org.junit.internal.runners.model.reflectivecallable.run(reflectivecallable.java:12) @ org.junit.runners.model.frameworkmethod.invokeexplosively(frameworkmethod.java:44) @ org.junit.internal.runners.statements.runbefores.evaluate(runbefores.java:24) @ org.robolectric.robolectrictestrunner$2.evaluate(robolectrictestrunner.java:241) @ org.junit.runners.parentrunner.runleaf(parentrunner.java:271) @ org.junit.runners.blockjunit4classrunner.runchild(blockjunit4classrunner.java:70) @ org.junit.runners.blockjunit4classrunner.runchild(blockjunit4classrunner.java:50) @ org.junit.runners.parentrunner$3.run(parentrunner.java:238) @ org.junit.runners.parentrunner$1.schedule(parentrunner.java:63) @ org.junit.runners.parentrunner.runchildren(parentrunner.java:236) @ org.junit.runners.parentrunner.access$000(parentrunner.java:53) @ org.junit.runners.parentrunner$2.evaluate(parentrunner.java:229) @ org.robolectric.robolectrictestrunner$1.evaluate(robolectrictestrunner.java:177) @ org.junit.runners.parentrunner.run(parentrunner.java:309) @ org.gradle.api.internal.tasks.testing.junit.junittestclassexecuter.runtestclass(junittestclassexecuter.java:80) @ org.gradle.api.internal.tasks.testing.junit.junittestclassexecuter.execute(junittestclassexecuter.java:47) @ org.gradle.api.internal.tasks.testing.junit.junittestclassprocessor.processtestclass(junittestclassprocessor.java:69) @ org.gradle.api.internal.tasks.testing.suitetestclassprocessor.processtestclass(suitetestclassprocessor.java:49) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25) @ java.lang.reflect.method.invoke(method.java:597) @ org.gradle.messaging.dispatch.reflectiondispatch.dispatch(reflectiondispatch.java:35) @ org.gradle.messaging.dispatch.reflectiondispatch.dispatch(reflectiondispatch.java:24) @ org.gradle.messaging.dispatch.contextclassloaderdispatch.dispatch(contextclassloaderdispatch.java:32) @ org.gradle.messaging.dispatch.proxydispatchadapter$dispatchinginvocationhandler.invoke(proxydispatchadapter.java:93) @ com.sun.proxy.$proxy2.processtestclass(unknown source) @ org.gradle.api.internal.tasks.testing.worker.testworker.processtestclass(testworker.java:103) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25) @ java.lang.reflect.method.invoke(method.java:597) ... 7 more caused by: android.view.inflateexception: xml file ~/workspace-studio/frontlinesms-for-android/frontlinesms/build/res/all/debug/layout/actionbar.xml line #-1 (sorry, not yet implemented): error inflating class android.widget.progressbar @ android.view.layoutinflater.createview(layoutinflater.java:613) @ org.robolectric.shadows.robolayoutinflater.oncreateview(robolayoutinflater.java:38) @ android.view.layoutinflater.oncreateview(layoutinflater.java:660) @ android.view.layoutinflater.createviewfromtag(layoutinflater.java:685) @ android.view.layoutinflater.rinflate(layoutinflater.java:746) @ android.view.layoutinflater.rinflate(layoutinflater.java:749) @ android.view.layoutinflater.inflate(layoutinflater.java:489) @ android.view.layoutinflater.inflate(layoutinflater.java:396) @ net.frontlinesms.android.ui.view.actionbar.<init>(actionbar.java:65) @ android.view.layoutinflater.createview(layoutinflater.java:587) @ android.view.layoutinflater.createviewfromtag(layoutinflater.java:687) @ android.view.layoutinflater.rinflate(layoutinflater.java:746) @ android.view.layoutinflater.inflate(layoutinflater.java:489) @ android.view.layoutinflater.inflate(layoutinflater.java:396) @ android.view.layoutinflater.inflate(layoutinflater.java:352) @ org.robolectric.tester.android.view.robowindow.setcontentview(robowindow.java:82) @ org.robolectric.shadows.shadowactivity.setcontentview(shadowactivity.java:272) @ android.app.activity.setcontentview(activity.java) @ net.frontlinesms.android.activity.keywordlist.oncreate(keywordlist.java:70) @ android.app.activity.performcreate(activity.java:5008) @ org.fest.reflect.method.invoker.invoke(invoker.java:112) @ org.robolectric.util.activitycontroller$1.run(activitycontroller.java:119) @ org.robolectric.shadows.shadowlooper.runpaused(shadowlooper.java:256) @ org.robolectric.util.activitycontroller.create(activitycontroller.java:114) @ org.robolectric.util.activitycontroller.create(activitycontroller.java:126) @ net.frontlinesms.android.basictest.setup(basictest.java:30) @ org.junit.runners.model.frameworkmethod$1.runreflectivecall(frameworkmethod.java:47) @ org.junit.internal.runners.model.reflectivecallable.run(reflectivecallable.java:12) @ org.junit.runners.model.frameworkmethod.invokeexplosively(frameworkmethod.java:44) @ org.junit.internal.runners.statements.runbefores.evaluate(runbefores.java:24) @ org.robolectric.robolectrictestrunner$2.evaluate(robolectrictestrunner.java:241) @ org.junit.runners.parentrunner.runleaf(parentrunner.java:271) @ org.junit.runners.blockjunit4classrunner.runchild(blockjunit4classrunner.java:70) @ org.junit.runners.blockjunit4classrunner.runchild(blockjunit4classrunner.java:50) @ org.junit.runners.parentrunner$3.run(parentrunner.java:238) @ org.junit.runners.parentrunner$1.schedule(parentrunner.java:63) @ org.junit.runners.parentrunner.runchildren(parentrunner.java:236) @ org.junit.runners.parentrunner.access$000(parentrunner.java:53) @ org.junit.runners.parentrunner$2.evaluate(parentrunner.java:229) @ org.robolectric.robolectrictestrunner$1.evaluate(robolectrictestrunner.java:177) @ org.junit.runners.parentrunner.run(parentrunner.java:309) @ org.gradle.api.internal.tasks.testing.junit.junittestclassexecuter.runtestclass(junittestclassexecuter.java:80) @ org.gradle.api.internal.tasks.testing.junit.junittestclassexecuter.execute(junittestclassexecuter.java:47) @ org.gradle.api.internal.tasks.testing.junit.junittestclassprocessor.processtestclass(junittestclassprocessor.java:69) @ org.gradle.api.internal.tasks.testing.suitetestclassprocessor.processtestclass(suitetestclassprocessor.java:49) @ org.gradle.messaging.dispatch.reflectiondispatch.dispatch(reflectiondispatch.java:35) @ org.gradle.messaging.dispatch.reflectiondispatch.dispatch(reflectiondispatch.java:24) @ org.gradle.messaging.dispatch.contextclassloaderdispatch.dispatch(contextclassloaderdispatch.java:32) @ org.gradle.messaging.dispatch.proxydispatchadapter$dispatchinginvocationhandler.invoke(proxydispatchadapter.java:93) @ com.sun.proxy.$proxy2.processtestclass(unknown source) @ org.gradle.api.internal.tasks.testing.worker.testworker.processtestclass(testworker.java:103) ... 7 more caused by: java.lang.reflect.invocationtargetexception @ sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method) @ sun.reflect.nativeconstructoraccessorimpl.newinstance(nativeconstructoraccessorimpl.java:39) @ sun.reflect.delegatingconstructoraccessorimpl.newinstance(delegatingconstructoraccessorimpl.java:27) @ java.lang.reflect.constructor.newinstance(constructor.java:513) @ android.view.layoutinflater.$$robo$$layoutinflater_1d1f_createview(layoutinflater.java:587) @ android.view.layoutinflater.createview(layoutinflater.java) @ org.robolectric.shadows.robolayoutinflater.oncreateview(robolayoutinflater.java:38) @ android.view.layoutinflater.$$robo$$layoutinflater_1d1f_oncreateview(layoutinflater.java:660) @ android.view.layoutinflater.oncreateview(layoutinflater.java) @ android.view.layoutinflater.$$robo$$layoutinflater_1d1f_createviewfromtag(layoutinflater.java:685) @ android.view.layoutinflater.createviewfromtag(layoutinflater.java) @ android.view.layoutinflater.$$robo$$layoutinflater_1d1f_rinflate(layoutinflater.java:746) @ android.view.layoutinflater.rinflate(layoutinflater.java) @ android.view.layoutinflater.$$robo$$layoutinflater_1d1f_rinflate(layoutinflater.java:749) @ android.view.layoutinflater.rinflate(layoutinflater.java) @ android.view.layoutinflater.$$robo$$layoutinflater_1d1f_inflate(layoutinflater.java:489) @ android.view.layoutinflater.inflate(layoutinflater.java) @ android.view.layoutinflater.$$robo$$layoutinflater_1d1f_inflate(layoutinflater.java:396) @ android.view.layoutinflater.inflate(layoutinflater.java) @ net.frontlinesms.android.ui.view.actionbar.<init>(actionbar.java:65) @ sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method) @ sun.reflect.nativeconstructoraccessorimpl.newinstance(nativeconstructoraccessorimpl.java:39) @ sun.reflect.delegatingconstructoraccessorimpl.newinstance(delegatingconstructoraccessorimpl.java:27) @ java.lang.reflect.constructor.newinstance(constructor.java:513) @ android.view.layoutinflater.$$robo$$layoutinflater_1d1f_createview(layoutinflater.java:587) @ android.view.layoutinflater.createview(layoutinflater.java) @ android.view.layoutinflater.$$robo$$layoutinflater_1d1f_createviewfromtag(layoutinflater.java:687) @ android.view.layoutinflater.createviewfromtag(layoutinflater.java) @ android.view.layoutinflater.$$robo$$layoutinflater_1d1f_rinflate(layoutinflater.java:746) @ android.view.layoutinflater.rinflate(layoutinflater.java) @ android.view.layoutinflater.$$robo$$layoutinflater_1d1f_inflate(layoutinflater.java:489) @ android.view.layoutinflater.inflate(layoutinflater.java) @ android.view.layoutinflater.$$robo$$layoutinflater_1d1f_inflate(layoutinflater.java:396) @ android.view.layoutinflater.inflate(layoutinflater.java) @ android.view.layoutinflater.$$robo$$layoutinflater_1d1f_inflate(layoutinflater.java:352) @ android.view.layoutinflater.inflate(layoutinflater.java) @ org.robolectric.tester.android.view.robowindow.setcontentview(robowindow.java:82) @ org.robolectric.shadows.shadowactivity.setcontentview(shadowactivity.java:272) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25) @ java.lang.reflect.method.invoke(method.java:597) @ org.robolectric.bytecode.shadowwrangler$shadowmethodplan.run(shadowwrangler.java:455) @ android.app.activity.setcontentview(activity.java) @ net.frontlinesms.android.activity.keywordlist.oncreate(keywordlist.java:70) @ android.app.activity.$$robo$$activity_c57b_performcreate(activity.java:5008) @ android.app.activity.performcreate(activity.java) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25) @ java.lang.reflect.method.invoke(method.java:597) @ org.fest.reflect.method.invoker.invoke(invoker.java:112) @ org.robolectric.util.activitycontroller$1.run(activitycontroller.java:119) @ org.robolectric.shadows.shadowlooper.runpaused(shadowlooper.java:256) @ org.robolectric.util.activitycontroller.create(activitycontroller.java:114) @ org.robolectric.util.activitycontroller.create(activitycontroller.java:126) @ net.frontlinesms.android.basictest.setup(basictest.java:30) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25) @ java.lang.reflect.method.invoke(method.java:597) @ org.junit.runners.model.frameworkmethod$1.runreflectivecall(frameworkmethod.java:47) @ org.junit.internal.runners.model.reflectivecallable.run(reflectivecallable.java:12) @ org.junit.runners.model.frameworkmethod.invokeexplosively(frameworkmethod.java:44) @ org.junit.internal.runners.statements.runbefores.evaluate(runbefores.java:24) @ org.robolectric.robolectrictestrunner$2.evaluate(robolectrictestrunner.java:241) @ org.junit.runners.parentrunner.runleaf(parentrunner.java:271) @ org.junit.runners.blockjunit4classrunner.runchild(blockjunit4classrunner.java:70) @ org.junit.runners.blockjunit4classrunner.runchild(blockjunit4classrunner.java:50) @ org.junit.runners.parentrunner$3.run(parentrunner.java:238) @ org.junit.runners.parentrunner$1.schedule(parentrunner.java:63) @ org.junit.runners.parentrunner.runchildren(parentrunner.java:236) @ org.junit.runners.parentrunner.access$000(parentrunner.java:53) @ org.junit.runners.parentrunner$2.evaluate(parentrunner.java:229) @ org.robolectric.robolectrictestrunner$1.evaluate(robolectrictestrunner.java:177) @ org.junit.runners.parentrunner.run(parentrunner.java:309) @ org.gradle.api.internal.tasks.testing.junit.junittestclassexecuter.runtestclass(junittestclassexecuter.java:80) @ org.gradle.api.internal.tasks.testing.junit.junittestclassexecuter.execute(junittestclassexecuter.java:47) @ org.gradle.api.internal.tasks.testing.junit.junittestclassprocessor.processtestclass(junittestclassprocessor.java:69) @ org.gradle.api.internal.tasks.testing.suitetestclassprocessor.processtestclass(suitetestclassprocessor.java:49) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25) @ java.lang.reflect.method.invoke(method.java:597) @ org.gradle.messaging.dispatch.reflectiondispatch.dispatch(reflectiondispatch.java:35) @ org.gradle.messaging.dispatch.reflectiondispatch.dispatch(reflectiondispatch.java:24) @ org.gradle.messaging.dispatch.contextclassloaderdispatch.dispatch(contextclassloaderdispatch.java:32) @ org.gradle.messaging.dispatch.proxydispatchadapter$dispatchinginvocationhandler.invoke(proxydispatchadapter.java:93) @ com.sun.proxy.$proxy2.processtestclass(unknown source) @ org.gradle.api.internal.tasks.testing.worker.testworker.processtestclass(testworker.java:103) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25) @ java.lang.reflect.method.invoke(method.java:597) ... 7 more caused by: java.lang.classcastexception: org.robolectric.res.attrdata cannot cast org.robolectric.res.styledata @ org.robolectric.shadows.shadowassetmanager$styleresolver.getparent(shadowassetmanager.java:353) @ org.robolectric.shadows.shadowassetmanager$styleresolver.getattrvalue(shadowassetmanager.java:336) @ org.robolectric.shadows.shadowresources.findattributevalue(shadowresources.java:259) @ org.robolectric.shadows.shadowresources.attrstotypedarray(shadowresources.java:188) @ org.robolectric.shadows.shadowresources.access$000(shadowresources.java:51) @ org.robolectric.shadows.shadowresources$shadowtheme.obtainstyledattributes(shadowresources.java:460) @ android.content.res.resources$theme.obtainstyledattributes(resources.java) @ android.content.context.obtainstyledattributes(context.java:374) @ android.view.view.__constructor__(view.java:3297) @ org.fest.reflect.method.invoker.invoke(invoker.java:112) @ org.robolectric.shadows.shadowview.__constructor__(shadowview.java:68) @ android.view.view.<init>(view.java:3295) @ android.widget.progressbar.<init>(progressbar.java:253) @ android.widget.progressbar.<init>(progressbar.java:246) @ android.widget.progressbar.<init>(progressbar.java:242) @ android.view.layoutinflater.createview(layoutinflater.java:587) @ org.robolectric.shadows.robolayoutinflater.oncreateview(robolayoutinflater.java:38) @ android.view.layoutinflater.oncreateview(layoutinflater.java:660) @ android.view.layoutinflater.createviewfromtag(layoutinflater.java:685) @ android.view.layoutinflater.rinflate(layoutinflater.java:746) @ android.view.layoutinflater.rinflate(layoutinflater.java:749) @ android.view.layoutinflater.inflate(layoutinflater.java:489) @ android.view.layoutinflater.inflate(layoutinflater.java:396) @ net.frontlinesms.android.ui.view.actionbar.<init>(actionbar.java:65) @ android.view.layoutinflater.createview(layoutinflater.java:587) @ android.view.layoutinflater.createviewfromtag(layoutinflater.java:687) @ android.view.layoutinflater.rinflate(layoutinflater.java:746) @ android.view.layoutinflater.inflate(layoutinflater.java:489) @ android.view.layoutinflater.inflate(layoutinflater.java:396) @ android.view.layoutinflater.inflate(layoutinflater.java:352) @ org.robolectric.tester.android.view.robowindow.setcontentview(robowindow.java:82) [truncated, hit stack overflow character limit...] 

i found right place put it. first, structure of application shown below:

my application under

app/src/main/ 

my test application under

app/src/test/ 

you should name property file robolectric.properties , put under

src/test/resources/  

the content of robolectric.properties is

manifest: src/main/androidmanifest.xml 

then, test program can locate property file!


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -