如何解决在Travis CI上运行Detox Android
我想知道是否有特定的事情可以使Detox在Travis CI的仿真器中运行。
我正在配置Detox的React Native项目中,一切都在我的本地机器(iOS和Android)上正常工作。但是,每次我在CI上启动Android作业时,它都会失败...成功运行测试套件的iOS没有问题。
我尝试了不同版本的模拟器,最终成功启动了模拟器(用于测试的Android 22和28),但是现在我总是遇到以下错误,这些错误似乎在启动{{ 1}}命令。
排毒配置文件中的detox test
名称与用于在CI中创建仿真器的名称相同,因此我不理解错误,并且可以在日志中看到仿真器已准备就绪...
avdName
我的detox[8418] ERROR: [exec.js/EXEC_FAIL,#1] ""/usr/local/android-sdk/tools/emulator" -version" failed with code = 1,stdout and stderr:
detox[8418] ERROR: [exec.js/EXEC_FAIL,#1] emulator: ERROR: No AVD specified. Use '@foo' or '-avd foo' to launch a virtual device named 'foo'
detox[8418] ERROR: [exec.js/EXEC_FAIL,#1]
detox[8418] ERROR: [EmulatorVersionResolver.js/EMU_BIN_VERSION_DETECT] Could not detect emulator binary version { ChildProcessError: Command failed: "/usr/local/android-sdk/tools/emulator" -version
`"/usr/local/android-sdk/tools/emulator" -version` (exited with error code 1)
at callback (/home/travis/build/tsyirvo/react-native-starter/node_modules/child-process-promise/lib/index.js:33:27)
at ChildProcess.exithandler (child_process.js:301:5)
at ChildProcess.emit (events.js:198:13)
at maybeClose (internal/child_process.js:982:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
name: 'ChildProcessError',code: 1,childProcess:
{ ChildProcess: { [Function: ChildProcess] super_: [Function] },fork: [Function: fork],_forkChild: [Function: _forkChild],exec: [Function: exec],execFile: [Function: execFile],spawn: [Function: spawn],spawnSync: [Function: spawnSync],execFileSync: [Function: execFileSync],execSync: [Function: execSync] },stdout:
'emulator: ERROR: No AVD specified. Use \'@foo\' or \'-avd foo\' to launch a virtual device named \'foo\'\n\n',stderr: '' }
detox[8418] WARN: [EmulatorDriver.js/EMU_SKIN_CFG_PATCH] Failed to detect emulator version! (see previous logs)
This leaves Detox unable to tell if it should automatically apply this patch-fix: https://stackoverflow.com/a/47265664/453052,which seems to be needed in emulator versions < 28.
If you feel this is not needed,you can either ignore this message,or otherwise apply the patch manually.
detox[8418] ERROR: Error: No instrumentation runner found on device emulator-5554 for package com.rnstarter
看起来像这样:
.travis.yml
我在配置中错过了什么吗?
谢谢!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。