Thanks Mark.

I downloaded the Prefs project and imported it. 
I then selected the tests directory and right clicked and selected Run as. 
It gave me one option, Run configuration.
I clicked on that and got a dialog that had "Create, manage, and run 
configurations".  
Under Android JUnit Test it has Prefs selected. 
On the right it has that same empty drop down though by the words 
"Instrumentation runner:".

That's what needs to be filled out to run the tests (trust me...it will 
choke otherwise...I've tried like a dozen times or so in different ways).

So, just how are you running your JUnit tests? Do you not select the tests 
directory and right click? There must be another step you did to specify 
the instrumentation runner...that's the key but it cannot be selected as 
the list is empty.

Note that if I right click the project itself and select Run as Android 
JUnit test it attempts to run by gripes that it cannot find the Prefs.apk  
(which for a JUnit test I'm not sure why it is searching for anyway)



On Monday, December 10, 2012 12:50:16 PM UTC-6, Mark Murphy (a Commons Guy) 
wrote:
>
> On Mon, Dec 10, 2012 at 1:39 PM, darrinps <darr...@gmail.com <javascript:>> 
> wrote: 
> > Are you using Eclipse Indigo? 
>
> Yes. 
>
> > I tried doing that and the thing griped that it could find the test 
> runner 
> > and no matter what I did it just wasn't happy. 
> > 
> > What I did was: 
> > 
> > 1) Create a project (an old one I want to add JUnit tests to actually) 
> > 2) Create a test project based on that 
> > 3) Created a sub directory inside of the main project called tests at 
> the 
> > same level as the src, res, etc. directories. 
> > 4) Moved the files inside of the test project to that sub directory 
> under 
> > the main project. 
> > 5) Right clicked on the test directory and selected Run which brought up 
> a 
> > dialog to add the run type. 
> > 6) Selected Android JUnit tests 
> > 7) Saw an empty runnable drop down with no way to select anything. 
> > 8) Scoured the Internet for a fix 
> > 9) Tried to implement the suggestions (which didn't even seem to fit the 
> > situation but tried anyway) 
> > 10) Banged head against wall 
>
> AFAIK, all I did was: 
>
> 1) Create a project 
> 2) Create a test project based on that directly into tests/ of the 
> project from 1) 
>
> You are also welcome to examine the projects I linked to in order to 
> see how they are set up. Eclipse project files should be in each repo. 
>
> -- 
> Mark Murphy (a Commons Guy) 
> http://commonsware.com | http://github.com/commonsguy 
> http://commonsware.com/blog | http://twitter.com/commonsguy 
>
> _The Busy Coder's Guide to Android Development_ Version 4.4 Available! 
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to