How to run the unit tests of the APIDemo at the command prompt

by » Thu, 29 Jan 2009 09:23:34 GMT

Sponsored Links

In the source of ApiDemos, it said:
 * To run just this suite from the command line:
 * $ adb shell am instrument -w \
 *   -e class \

So I get the error 'device not found'
$ cd /Users/meryl/Programs/android-sdk-mac_x86-1.0_r2/samples/ApiDemos/

$ /Users/meryl/Programs/android-sdk-mac_x86-1.0_r2/tools/adb shell am
instrument -w -e class
error: device not found

The location of my source is in /Users/meryl/Programs/android-sdk-
and the bin directory is where eclipse puts the class files.

Can you please tell me how to get the command line execution to work?

Thank you.


Other Threads

1. Basic Emma code coverage tutorial needed

Hi All,

I am looking a way to use Emma on Android project. I have an
application -project, and withing that, I have Junit test cases.
Now How do I use Emma tool(command line) to get code coverage report
on testcases?

I searched a lot but could not find a good/simple tutorial.
I read somewhere that Android ant lib has a target "coverage" that
does all thing, (running test cases, generating emma report). How do I
use that?



2. ContentProvider's DB file access right problem when its android:multiprocess=true

According to Android Dev Guide (
TW/guide/topics/manifest/provider-element.html), it says that    if
android:multiprocess is set to "true", the system can create an
instance in every process where there's a client that wants to
interact with it, thus avoiding the overhead of interprocess

But...  since the multiple ContentProvider instances are running in
different process space, how do they access the DB file that was
created in different process space or user ID?

I've checked browser & in its packages/apps/Browser/
AndroidManifest.xml:  android:multiprocess="true"
-rw-r--r-- app_12   app_12        512 1903-02-27 13:29 webviewCache.db-
-rw-rw---- app_12   app_12       5120 1903-02-27 13:29 browser.db
-rw-rw---- app_12   app_12       6144 1903-02-27 13:29 webviewCache.db
-rw-rw---- app_12   app_12      14336 1903-02-27 13:29 webview.db

Does any one know why???


3. removing item from ListView

4. OOT | vynil itu apa ya?

5. conditional build

6. Android bring-up

7. android on imx 51