We have implemented JUnit test cases for Phone application using
Contacts test cases as a reference.

1. Added 'tests' directory under Phone directory with Android.mk.
AndroidManifest.xml and src & res folders for test cases.
2. Updated Android.mk in Phone directory to pick Android.mk in tests
directory.
3. Updated <android root>/development/testrunner/test-defs.xml to
include Phone application tests.

We ran runtest.py to run the Phone test cases with emulator. We are
getting the following error.

android.util.AndroidException: INSTRUMENTATION_FAILED:
com.android.phone.tests/
android.test.InstrumentationTestRunnerINSTRUMENTATION_STATUS:
Error=Unable to find instrumentation target package: com.android.phone

Also, from logcat:

D/PackageManager(   62): Scanning package com.android.phone
D/PackageManager(   62): Shared UserID android.uid.phone (uid=1001):
packages=[PackageSetting{43c87288 com.android.providers.telephony/
1001}]
E/PackageManager(   62): Package com.android.phone has no signatures
that match those in shared user android.uid.phone; ignoring!
D/PackageParser(   62): Scanning package: /data/app/PhoneTests.apk
I/PackageManager(   62): /data/app/PhoneTests.apk changed; collecting
certs
D/PackageManager(   62): Scanning package com.android.phone.tests
D/installd(   31): DexInv: --- BEGIN '/data/app/PhoneTests.apk' ---
D/dalvikvm(  419): DexOpt: load 65ms, verify 9ms, opt 13ms
D/installd(   31): DexInv: --- END '/data/app/
PhoneTests.apk' (success) ---
D/PackageManager(   62):   Instrumentation:
android.test.InstrumentationTestRunner
D/ActivityManager(   62): Uninstalling process com.android.phone.tests

Looks like the test-runner is trying to replace Phone app with an
instrumented version and that seems to be failing.

How do we resolve this issue with Signature mismatch?

Regards,
Jags

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to