Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Eclipse Plugin: Instrumentation Test Runner not specified

I'm getting this error when trying to run unit tests from Eclipse with an Android Project. The list of Instrumentation Test Runners is empty in the Android preferences.

[2009-06-17 23:57:51 - MyApp] ERROR: Application does not specify a android.test.InstrumentationTestRunner instrumentation or does not declare uses-library android.test.runner

It's also annoyingly decided that because I tried to run a unit test once, that's what I always want to do.

like image 666
Rob Stevenson-Leggett Avatar asked Jun 17 '09 23:06

Rob Stevenson-Leggett


1 Answers

You're probably missing the uses-library and instrumentation nodes in your AndroidManifest.xml:

<manifest ...>     <application ...>         <!-- ... -->         <uses-library android:name="android.test.runner" />     </application>     <instrumentation android:name="android.test.InstrumentationTestRunner"         android:targetPackage="your.package"         android:label="your tests label" /> </manifest> 
like image 187
Josef Pfleger Avatar answered Oct 03 '22 07:10

Josef Pfleger