0

To test Android apps using Calabash, documentation says,

The apk calabash android runs must be signed with the same keystore as the test-server.

Same is for Robotium

If you want to test an apk file e.g. with Robotium the android app apk and your test project apk file MUST have the same signature!

Why is resigning of the app required? None of the sources state that explicitly.

sherlock
  • 2,397
  • 3
  • 27
  • 44
  • 1
    For instrumented testing (e.g., for Robotium), the test APK and the app APK have always needed to be signed with same signing key -- this is how Android knows to relax some security restrictions and allow the two APKs to be a part of the same process and virtual machine. This should not require "resigning", since you are testing your own app, and so signing the two APKs with the same signing key is pretty much the default behavior. – CommonsWare Jul 13 '18 at 23:04
  • By "test apk", you meant the "test driver/server", right? – sherlock Jul 13 '18 at 23:19
  • I mean the APK that contains the Java/Kotlin/whatever code that embodies the tests. – CommonsWare Jul 13 '18 at 23:21
  • Where does the Android docs specify the security restrictions which are lifted for apps signed by the same key? – sherlock Jul 13 '18 at 23:22
  • I doubt that the developer documentation has that. It's possible that this is covered in the AOSP docs somewhere. – CommonsWare Jul 13 '18 at 23:37
  • adding to what @CommonsWare said it not necessary that you sign the AUT you can do other way around. Sign the test-server with your keystore https://stackoverflow.com/questions/27109585/calabash-android-what-does-resign-do – pr4bh4sh Sep 23 '18 at 17:21

0 Answers0