Lea*_*ira 3 android travis-ci android-espresso
我在Travis CI中运行Espresso测试.当我在我的设备中运行测试时,我通常会禁用所有动画,所以我不必一直使用Thread.sleep.
但我真的不知道如何在Travis CI中执行此操作,因此我的测试在没有Thread.sleep的情况下失败.我查看了互联网...但我没有找到任何有关如何在模拟器中禁用动画的教程
我知道,我可以在Espresso中使用空闲资源.但有些时候我不愿意.
如果您尝试@azizbekian的路径,我会在这里写下来,在这里创建新的测试规则并在这里进行测试
我确认上特拉维斯-CI为Android的API 17-22 @Testujaca Malpeczka路径作品讨论在这里
如果您正在寻找最新的Android API和工具的解决方案,请在此处和此处进行操作
before_script:
# Wait for emulator fully-booted and disable animations
- android-wait-for-emulator
- 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 &
- adb shell input keyevent 82 &
Run Code Online (Sandbox Code Playgroud)
它也可以在Circle-ci和任何连续集成构建服务器中使用,请参见此处的断开链接
test:
pre:
- ...
- circle-android wait-for-boot
- adb shell input keyevent 82
- 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
Run Code Online (Sandbox Code Playgroud)
我的扩展测试规则适用于Android API 15-22,并且Android 23仿真器中存在一个错误。
另一天,我将使用android-topeka示例在24+的更高版本中尝试使用它,可能可行。
任何帮助,改进或有效的替代使用sdkmanager
将不胜感激。
小智 5
如果可能使用adb shell命令:
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
Run Code Online (Sandbox Code Playgroud)
在jenkins ci上测试过
归档时间: |
|
查看次数: |
1247 次 |
最近记录: |