Closed CoreFloDev closed 3 years ago
Hi @CoreFloDev ! Indeed, animations are not off by default, and you may run the exact script you mentioned to disable them!
Or are you meaning to submit this to us as a feature request, to include this option in the step by default? :)
Hi @bitce,
We are using the '[BETA] Virtual Device Testing for Android' step on Bitrise.
This step bring up an emulator, runs the tests and destroys the emulator.
Our problem is that we cannot place a step before or after this step to disable animations as the emulator will not exist during those times.
Ideally it would be nice to setup hooks on the Virtual Device step so that we can run the above adb commands when the emulator is created. Alternatively an option to disable animations would be nice.
Hey @shendriksen,
Sorry, should have clarified first that in order to do this you need the Android Debug Bridge, as this would allow you to connect to the device in the meantime and run the adb commands.
@bitce we are currently using the following steps:
We would like to use ADB as you mention but putting a script with the below, before or after '[BETA] Virtual Device Testing for Android', will not work.
adb shell settings put global window_animation_scale 0
adb shell settings put global transition_animation_scale 0
adb shell settings put global animator_duration_scale 0
Do you have an example of what you are suggesting please?
Thanks
Sorry again, to summarize: you indeed can not add a script step to accomplish this. What I mean to suggest is that you can, in fact, set up adb and connect to the virtual device you are running the test on, and run these commands through the adb CLI during the test.
Thanks @bitce.
I have opened a feature request for the ability to run scripts after the device has booted: https://discuss.bitrise.io/t/beta-virtual-device-testing-for-android-custom-adb-script-option/5813
Sure thing!
I'm glad to hear that! We'll get back to you there too 😉
Have you actually seen this as a problem? Since this step is backed by AVDs on Firebase Test Lab, Bitrise users aren't the only ones with this problem. (i.e. i bet Firebase has animations turned off by default). You could always add this to your build.gradle (helpful for local testing too)
testOptions {
animationsDisabled true
}
Hello there, I'm a bot. On behalf of the community I thank you for opening this issue.
To help our human contributors focus on the most relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 90 days, so I marked it as stale.
The community would appreciate if you could check if the issue still persists. If it isn't, please close it. If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me".
If no comment left within 21 days, this issue will be closed.
I don't use Bitrise on my new projects so no
Hi,
We are using this emulator to run Android Espresso tests on Bitrise. One of the requirement to avoid flaky tests, is to disable animations on the device as specified in the documentation https://developer.android.com/training/testing/espresso/setup
Unfortunately, it seems that there is no option to disable animations. Is it possible to add a parameter to disable them? Or maybe I am just missing something?
To disable the animation, this command work well:
Please tell me if you need more details
Thanks!