Closed sprajagopal closed 1 year ago
My tests work on a local emulator but with this:
Does your test work locally?
Can you try adding the following before ./gradlew connectedCheck
:
adb shell settings put global window_animation_scale 0.0
adb shell settings put global transition_animation_scale 0.0
adb shell settings put global animator_duration_scale 0.0
Does your test work locally?
I tried on Pixel and Nexus devices locally (on the Android Studio) and they work fine.
Can you try adding the following before
./gradlew connectedCheck
:adb shell settings put global window_animation_scale 0.0 adb shell settings put global transition_animation_scale 0.0 adb shell settings put global animator_duration_scale 0.0
Tried that.
/usr/local/lib/android/sdk/platform-tools/adb shell getprop sys.boot_completed
1
Emulator booted.
/usr/local/lib/android/sdk/platform-tools/adb shell input keyevent 82
Disabling animations.
/usr/local/lib/android/sdk/platform-tools/adb shell settings put global window_animation_scale 0.0
/usr/local/lib/android/sdk/platform-tools/adb shell settings put global transition_animation_scale 0.0
/usr/local/lib/android/sdk/platform-tools/adb shell settings put global animator_duration_scale 0.0
/usr/bin/sh -c adb shell settings put global window_animation_scale 0.0
/usr/bin/sh -c adb shell settings put global transition_animation_scale 0.0
/usr/bin/sh -c adb shell settings put global animator_duration_scale 0.0
/usr/bin/sh -c ./gradlew connectedCheck --stacktrace
No change in the errors.
androidx.test.espresso.PerformException: Error performing 'scroll to' on view 'Animations or transitions are enabled on the target device.
Out of the many tests, most of them also fail with:
androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching
@sprajagopal https://github.com/ReactiveCircus/android-emulator-runner/issues/162#issuecomment-883038261 might help.
For anyone who sees this in the future, it would help to get a recording of the run. You can run a step that installs ffmpeg
then records for a duration to see what is happening on the VM and emulator.
- name: Install and Record FFMPEG
run: |
brew install ffmpeg
ffmpeg -f avfoundation -i 0 -t 240 video-recording.mov &
## run tests here
- name: Upload Video Recording
uses: actions/upload-artifact@v3
with:
name: out
path: out.mov
Closing because stale, and because this would likely happen if emulator was started without using this action command (outside of this action's scope).
I have gone through the docs and other issues to debug this issue. This is my config:
I checked that adb commands are appropriately disabling the animations:
My tests work on a local emulator but with this:
The confusing part here is that animations are definitely disabled. This answer in stackoverflow mentions that NPE can cause this error but there is no stacktrace in this case.
I'm kinda lost at this point. I assumed local test cases would translate directly to this emulator but it doesn't seem to be the case. Are there any methods to debug this?