How to run Android/ Robotium Instrumentation test cases against a release version APK?

0
0

I have an Android project setup with its pure Java unit test project running on PC, and its functional/ integration test projects running on Emulator. Those two make use of InstrumentationTestCase2 test cases and also Robotium framework. I’m able to run those two from Eclipse, against the debug version of my app and collect results and so on.

I’m able to create a release APK both thru Eclipse export and Ant build. APK is signed, zipaligned and obfuscated.

I’d like to know how to run those functional/ integration test against the release version of my app, instead of the debug one. I know I might encur in some errors because app project contains some test-only classes that probably have been stripped out by Proguard, but I can handle that.

I searched on Google and here on SO, but with no luck. There’s only a page here related to testing with Robotium when you only have app’s APK, no source. I’m not sure this would really help me.
How would I get the test project to run on the device against the release APK?

  • You must to post comments
0
0

  1. Sign both the release app under test and the test Robotium app with
    your release key
  2. Install both apps on your device
  3. Run tests using the following command:

adb shell am instrument -w com.your.package/android.test.InstrumentationTestRunner

Where com.your.package is your package name.

See the Robotium Q&A for more info: http://code.google.com/p/robotium/wiki/QuestionsAndAnswers

As you mentioned, you might also have some Proguard issues depending on how you’ve written your test cases.

  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Website