[android-developers] Re: Testing several projects with a single test project

2010-08-30 Thread A. Elk
The Android instrumentation-based testing framework focuses on unit
testing and component-level functional testing. It's not meant to be a
full multi-application test system. You can't test an activity and the
content provider it uses in the same test case, nor can you test what
happens when the user goes out of one application to change a global
setting and then returns to the same application.

To get around these limitations, you have to write your own test
system.

A.

For example, it's not possible to test two different components (or
their interaction in a single

On Aug 30, 12:19 am, Andrey Panasyuk a.panas...@softteco.com wrote:
   Thank you for the comment.

 Unfortunately it's not the case since we also want to test interaction
 of several applications at a time.

 Now we're looking at a possibility to interact between applications and
 testcases project via services and service connections.



  You can make one test package that is capable of testing several
  applications, but it can only test one app at a time. For each new app
  you want to test, you have to update AndroidManifest.xml to point to
  the new target app, re-build the test package, and re-install it.

  What is your use case? Do you have a set of unit tests that you want
  to apply to different apps? This is a bit unusual, but conceivable.
  You could do this in a shell script. First install all your apps using
  adb install, then use sed or awk to modify the
  AndroidManifest.xml in the test project, build the test package, use
  adb -r to install it, and then adb shell am instrument to run the
  test and see the results. The last command is documented in the
  Android 2.2 Developer's Guide, under Guide  Developing  Testing
  Testing in Other IDEs.

  The Elk.

  On Aug 24, 12:36 am, Andrey Panasyuka.panas...@softteco.com  wrote:
  Hello,

  Is it possible to test several Android projects by having only one
  test project?
  I've tried various ways like specifying several instrumentation tags:

       instrumentation android:targetPackage=com.test1.test11
  android:name=android.test.InstrumentationTestRunner /
       instrumentation android:targetPackage=com.test1.test12
  android:name=android.test.InstrumentationTestRunner /

  or played with the packages but finally I got only tests for one
  application working correctly, tests for the other applications are
  giving java.lang.VerifyError.

  All of the applications are signed with the same key.

  Does anyone know if it is possible?

-- 
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


[android-developers] Re: Testing several projects with a single test project

2010-08-25 Thread A. Elk
You can make one test package that is capable of testing several
applications, but it can only test one app at a time. For each new app
you want to test, you have to update AndroidManifest.xml to point to
the new target app, re-build the test package, and re-install it.

What is your use case? Do you have a set of unit tests that you want
to apply to different apps? This is a bit unusual, but conceivable.
You could do this in a shell script. First install all your apps using
adb install, then use sed or awk to modify the
AndroidManifest.xml in the test project, build the test package, use
adb -r to install it, and then adb shell am instrument to run the
test and see the results. The last command is documented in the
Android 2.2 Developer's Guide, under Guide  Developing  Testing 
Testing in Other IDEs.

The Elk.

On Aug 24, 12:36 am, Andrey Panasyuk a.panas...@softteco.com wrote:
 Hello,

 Is it possible to test several Android projects by having only one
 test project?
 I've tried various ways like specifying several instrumentation tags:

     instrumentation android:targetPackage=com.test1.test11
 android:name=android.test.InstrumentationTestRunner /
     instrumentation android:targetPackage=com.test1.test12
 android:name=android.test.InstrumentationTestRunner /

 or played with the packages but finally I got only tests for one
 application working correctly, tests for the other applications are
 giving java.lang.VerifyError.

 All of the applications are signed with the same key.

 Does anyone know if it is possible?

-- 
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