Tuesday, December 11, 2012

Re: [android-developers] How is everyone configuring their JUnit tests?

Lew, I think it's you who don't comprehend English. I said (and I quote) "store the tests inside of the application itself ".

I was never talking about a single project. I just wanted to try to follow what the site clearly specified in where to put the test code.

You really shouldn't put others down like that. Not sure what axe you have to grind.




On Monday, December 10, 2012 5:02:54 PM UTC-6, Lew wrote:
Mark Murphy (a Commons Guy) wrote:
darrinps wrote:
> Yes, I am thinking that's the issue.
>
> Just did everything needed to get your other project set up (downloaded
> Action Bar Sherlock, created the library, etc.) only to see this when I
> tried to run it:
>
> JUnitDemo does not specify a android.test.InstrumentationTestRunner
> instrumentation or does not declare uses-library android.test.runner in its
> AndroidManifest.xml
>
> Same thing.

JUnitDemo is the application. The tests/ sub-project is the test
suite. You need to have both in your Eclipse workspace (import the
main project, then import the tests/ sub-project).
 
Once again, darrinps, you have to realize that the app project and the test project 
*are two separate projects*.

Failure to realize this has been the keystone to your confusion both for creation of 
the test project and its execution.

It's a *separate* project from the application.

Please read through the documentation thoroughly. I promise it's in there. Pay 
special attention to the command-line "android" commands for test projects.

 
You've gotten the same message multiple times from multiple people in this thread.

Your very first answer was from Larry Meadors, who wrote:
I believe that is "The Android Way" - you have your application in one 
project and your tests in another. 
 
Mark Murphy:
> I create a tests/ project within my main project,

Mark again:
> Because Prefs is not a test project. 
... 
> That is not in the Prefs project. That is in the tests/ sub-project. 
... 
> a regular Android project with a tests/ sub-project.

Me:
> If you were following the instructions on the page you cite, you'd be 
> creating a separate test project for each app project.

Me again:
> This page and the example you quote show one way to organize two projects. 

Mark again:
> JUnitDemo is the application. The tests/ sub-project is the test 
> suite. You need to have both in your Eclipse workspace (import the 
> main project, then import the tests/ sub-project). 

Really, this is on the web site, in the very pages you've been citing among others.

Now is the time to stop asking for more advice and follow the advice you've already 
received.

-- 
Lew

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment