Andrew Stadler wrote:
> Yes, you've also figured out that the name "packages" has been
> overloaded here.  In the context of the package manager, as well as
> the way that Instrumentation is applied, we are referring here to
> Android packages, which are mostly typically found in .apk files.

<snip>

> Anyway, as I said before, at the end of the day for any given app+test
> pair, you should be able to build both packages, install both
> packages, and view them using "adb shell pm list packages".  Only
> then, try running them....

Well, that got me further. Sorta.

I'm trying to test a library (JAR exposing a public API), not an app. So 
I tried setting targetPackage to be the closest thing I have to an 
"app", which is a sample app (xyz.sample). That works but claims there 
are no test cases in xyz.sample. That's absolutely true -- the test 
cases are in xyz.test -- and I have no idea why it would be looking in 
xyz.sample for tests when my adb shell command is telling it to run 
tests in xyz.test. Heck, I don't even know why it cares about xyz.sample 
in the first place.

What seems to work is making targetPackage in the manifest be the test 
package itself (xyz.test). That at least claims to run the tests, and I 
see the names of my tests in logcat output.

However, the fact that all tests are run twice, and assert(false); 
passes both times, doesn't exactly inspire me with confidence.

But, that's OK. I'll skin the cat some other way. Perhaps I'll circle 
back to the Android testing framework sometime in the future.

Thanks again for the help!

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.3 Published!

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

Reply via email to