로컬 에뮬레이터에서 계측 테스트를 실행하면 10 번 중 10 번 완벽하게 실행되지만 Travis CI의 AVD에서 동일한 테스트를 실행하려고하면 무작위로 난 단지 무작위로 트래비스에 무슨 일이 일어나고 여전히 진행 바, 모든하지만 문제를 제거하는 시도안드로이드 계측 테스트가 Travis CI AVD에서 실패하지만 로컬 에뮬레이터에서 작동
FAILED java.lang.RuntimeException: Could not launch intent Intent { } within 45 seconds. Perhaps the main thread has not gone idle within a reasonable amount of time? There could be an animation or something constantly repainting the screen. Or the activity is doing network calls on creation? See the threaddump logs. For your reference the last time the event queue was idle before your activity launch request was xxxxxxx and now the last time the queue went idle was: xxxxxxxxx. If these numbers are the same your activity might be hogging the event queue.
얻을. 내 travis.yml은 다음과 같습니다
env:
global:
- ANDROID_TARGET=android-19
- ANDROID_ABI=armeabi-v7a
before_script:
- android list targets
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
- emulator -avd test -no-skin -no-audio -no-window -no-boot-anim &
- android-wait-for-emulator
- adb shell input keyevent 82 &
script:
- ./gradlew jacocoTestReport assembleAndroidTest connectedCheck zipalignRelease