Re: android-studio "Unable to find instrumentation info"

4,610 views
Skip to first unread message

Xavier Ducrohet

unread,
May 19, 2013, 8:24:40 PM5/19/13
to adt...@googlegroups.com
To be honest, I don't think we've check this part after the Gradle integration. We'll look into it.

In the meantime you can run your tests from the command line. "./gradlew connectedCheck" will run you tests on all connected devices.


On Sat, May 18, 2013 at 3:15 PM, Eugen Hass <eugen...@googlemail.com> wrote:
Hello Guys, i am trying to use the new gradle build system with android studio.

If i try to execute instrumentation tests in Andrioid Studio i get following message:

Running tests
Test running startedTest running failed: Unable to find instrumentation info for: ComponentInfo{my.package.name/android.test.InstrumentationTestRunner}
Empty test suite.

I am using JDK 1.6 and Debian.

Tests are running fine from the console.

Does anyone else have this issue?

Best Regards,

Eugen


--
You received this message because you are subscribed to the Google Groups "adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

Xavier Ducrohet

unread,
May 22, 2013, 1:12:12 PM5/22/13
to adt...@googlegroups.com
As I said I'm not sure it's currently doable. The Gradle integration changed things enough that I doubt this is working.


On Tue, May 21, 2013 at 11:19 PM, Jonathan Lin Ern Sheong <erns...@gmail.com> wrote:
Hi yes I am having the same issue here. Would be great if someone posted details on how to get jUnit tests running on Android Studio.


On Sunday, May 19, 2013 6:15:08 AM UTC+8, Eugen Hass wrote:
Hello Guys, i am trying to use the new gradle build system with android studio.

If i try to execute instrumentation tests in Andrioid Studio i get following message:

Running tests
Test running startedTest running failed: Unable to find instrumentation info for: ComponentInfo{my.package.name/android.test.InstrumentationTestRunner}
Empty test suite.

I am using JDK 1.6 and Debian.

Tests are running fine from the console.

Does anyone else have this issue?

Best Regards,

Eugen


--
You received this message because you are subscribed to the Google Groups "adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jonathan Lin Ern Sheong

unread,
May 22, 2013, 8:57:45 PM5/22/13
to adt...@googlegroups.com

Hi Xavier, that's fine. Using the ADT for now, no worries. Thanks

You received this message because you are subscribed to a topic in the Google Groups "adt-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adt-dev/yrORz3VqFEI/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to adt-dev+u...@googlegroups.com.

Derek VerLee

unread,
Jun 19, 2013, 3:32:00 PM6/19/13
to adt...@googlegroups.com

I have the same thing... version 1.0.5, can not find tests in the IDE but is working from command line.  I'm wondering if android studio is not generating the manifest file for the test APK.  Unit testing is a priority for us, being able to do it in the IDE is important.  Let me know if there is anything I can do to help.  Thanks.

Siva Velusamy

unread,
Jun 20, 2013, 12:52:12 PM6/20/13
to adt...@googlegroups.com
IDE support for unit tests will be there in a week or two (0.1.7 or 0.1.8).

Derek VerLee

unread,
Jun 20, 2013, 1:45:26 PM6/20/13
to adt...@googlegroups.com
Siva,
This is great. Thanks for the reply and for the great work on Android Studio.

_Derek

Traun Leyden

unread,
Jun 20, 2013, 6:31:07 PM6/20/13
to adt...@googlegroups.com

Here's the list of pain points I'm currently experiencing while testing:

* Unable to run a single test via command line (someone posted a workaround, but I lost it)

* Unable to launch tests via IDE  

* Unable to debug a test (which would probably require being able to launch tests via IDE)

What can we expect to see in the 0.1.7 / .8 release in terms of test support in the IDE?   

Traun Leyden

unread,
Jun 29, 2013, 2:14:56 PM6/29/13
to adt...@googlegroups.com

Did this make it into 0.1.8?

Right now as a workaround, I have to copy/paste my test code into an application to be able to debug it.  It's pretty kludgy.


On Thursday, June 20, 2013 9:52:12 AM UTC-7, Siva Velusamy wrote:

Siva Velusamy

unread,
Jun 29, 2013, 3:59:34 PM6/29/13
to adt...@googlegroups.com
Yes, you can run instrumentation tests from the IDE in 0.1.8.

http://tools.android.com/recent/androidstudio018released

Debugging will be there in the next update.

Alvaro Pereda

unread,
Jul 3, 2013, 11:13:19 PM7/3/13
to adt...@googlegroups.com
Yes, the 0.1.9 features debugging instrumentation tests:

http://tools.android.com/recent/androidstudio019released

Traun Leyden

unread,
Jul 10, 2013, 8:26:33 PM7/10/13
to adt...@googlegroups.com

I'm having trouble running tests within a library that is included in a project.

The project layout can be seen here: https://github.com/couchbase/couchbase-lite-android

When I right click a test, here's the popup menu:  http://cl.ly/image/0k2C17142q3L  (I don't see a Run as type Android Junit test option)

And trying to run it gives this error:

07-11 00:25:55.903    7240-7240/com.couchbase.liteservandroid  E/AndroidRuntime: FATAL EXCEPTION: main
        java.lang.RuntimeException: Exception thrown in onCreate() of ComponentInfo{com.couchbase.liteservandroid.test/android.test.InstrumentationTestRunner}: java.lang.RuntimeException: Could not find test class. Class: com.couchbase.cblite.testapp.tests.RevTree
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4385)
        at android.app.ActivityThread.access$1300(ActivityThread.java:141)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1294)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:137)
        at android.app.ActivityThread.main(ActivityThread.java:5041)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:511)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
        at dalvik.system.NativeStart.main(Native Method)
        Caused by: java.lang.RuntimeException: Could not find test class. Class: com.couchbase.cblite.testapp.tests.RevTree
        at android.test.AndroidTestRunner.runFailed(AndroidTestRunner.java:254)
        at android.test.AndroidTestRunner.loadTestClass(AndroidTestRunner.java:88)
        at android.test.AndroidTestRunner.setTestClassName(AndroidTestRunner.java:49)
        at android.test.suitebuilder.TestSuiteBuilder.addTestClassByName(TestSuiteBuilder.java:80)
        at android.test.InstrumentationTestRunner.parseTestClass(InstrumentationTestRunner.java:444)
        at android.test.InstrumentationTestRunner.parseTestClasses(InstrumentationTestRunner.java:425)
        at android.test.InstrumentationTestRunner.onCreate(InstrumentationTestRunner.java:370)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4382)
        ... 10 more
07-11 00:25:55.913      286-297/system_process                 W/ActivityManager: Error in app com.couchbase.liteservandroid running instrumentation ComponentInfo{com.couchbase.liteservandroid.test/android.test.InstrumentationTestRunner}:
07-11 00:25:55.913      286-297/system_process                 W/ActivityManager: java.lang.RuntimeException
07-11 00:25:55.923      286-297/system_process                 W/ActivityManager: java.lang.RuntimeException: Could not find test class. Class: com.couchbase.cblite.testapp.tests.RevTree
07-11 00:25:55.933    7230-7230/?                              D/AndroidRuntime: Shutting down VM

Reply all
Reply to author
Forward
0 new messages