We're running CI server which runs checks for each commit.
./gradlew check
But it take ages, because it builds release build with ProGuard, etc. But when I try to run it with just debug variant, no tests and lint checks are run, it just finishes immediately.
./gradlew checkDebug
It's a bit WTF for me. How can we do that?
Related
I'm trying to test an Android app having 2 flavors.
I run them with gradlew connectedCheck
However if one test fails on the first flavor, then tests stop and the second flavor is never tested.
How can we make it continue with the 2nd flavour even if there was a failing test in the first?
So I want to build my tests and app, and then run the instrumentation tests whenever I want, even when I do not have access to the code (and hence, cannot use cAT task)
I have tried using assembleAndroidTest to generate test apk. But when I install this apk (as well as the app apk) and run am instrumentation with correct arguments (-e emma true, and with correct runner class verified using pm list instrumentation), I get no .ec file under /data/app/<package-name>. There is no error however.
I am using JaCoCo and when I run the tests using cAT, the coverage report is generated so I guess my JaCoCo configs are Ok.
after upgrading my react-native app to version 0.60.5, the application works just fine in debugging mode but when i try to get the android release files of my app by running this command:
react-native run-android --variant=release
the progress gets stuck at this line:
> :app:transformClassesAndResourcesWithR8ForRelease
and hangs on forever
note: i tried to delete the build and gradle folders and run ./gradlew clean but didn't work either
The command you want to use is a command to test APK, and you need to set it up to sign the app before that.
Note: that --variant=release is only available if you've set up
signing as described above.
See this official document to create a release app for signature and upload keys.
I have a problem with running Appium on my Android app. On release build, everything works fine. I'm able to run some basic test cases etc. The problem is when I switch from release to debug build. For debug, Appium is not able to open the app, there is a black screen and then error:
Exception in thread "main" org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameters.
....
On emulator app is opened but this error still occurring with the same stack-trace (and again, release build works just fine)
I've tried already running my tests on different android versions (API 23, 24, 28) and results always the same.
I'm using AndroidDriver to find elements by id and click on them.
Is any reason why release builds works but debug not. Is there something I can do in order to run my tests on debug build?
Edit 1. My application is a Native Android app.
I'm not able to open the debug app with the Appium desktop (I just see the Android home screen because Appium is not able to run the app).
According to differences between debug and release:
release build (exact opposite for the debug build):
debuggable disabled
minify enabled
shrink resources enabled
proguard enabled
Plus release build is signed
I'm working on test Android app and can build it as 'release' and 'debug',
Development takes place on laptops with Android Studio,
Testing will be based on Crashlytics,
Production will be on GPlay.
Please advice what (and why) should I chose between 'release' and 'debug' for each environment?
Your Android app will execute in debug mode in your development environment, such as while installing an app from Eclipse or Android Studio IDEs and it will execute in release mode when installing from Google Play. In release mode any debug logging, StrictMode and the debugging option must be disabled.
Use 'release' build to publish your app to GooglePlay. The time it takes to execute the build will be bit longer than if you use the 'debug' build.
Use 'debug' to run your app locally and test your app.
Also, the release build has ProGuard (code shrinking) for detecting and removing unused code from your app.