I would like to know how to run those functional / integration tests against the release version of my application, and not debugging.
I came across this question looking for a solution.
Since this is an old question with old answers, I will give an updated answer for the Android Gradle project.
What I've done:
- Let test apk work with the release build type by adding the following:
android { testBuildType "release" }
- add proguard rules for your apk test as well
buildTypes { release { minifyEnabled true proguardFiles 'proguard-rules.txt' testProguardFile('proguard-rules.txt') } }
Now try to run the test against release build. you may still encounter an error due to the proger. if you use Robotium, like me, you can add the following line to your proguard-rules.txt file:
##--------------- Begin: proguard configuration for Robotium ---------- -keep class com.robotium.** { *;} ##--------------- End: proguard configuration for Robotium ----------
Hope this helps.
xialin
source share