由于应用程序安装期间超时,运行 排毒测试失败
Failure to run detox tests due to timeout during the application installation
尝试在云 (AWS) 配置的机器上 运行 测试时,我在应用程序安装过程中遇到超时错误。
带有 --loglevel trace
的输出显示如下:
detox[7183] DEBUG: [exec.js/EXEC_CMD, #16] "/opt/android-sdk/platform-tools/adb" -s emulator-5554 shell "pm install -r -g -t /data/local/tmp/detox/Application.apk"
detox[7183] WARN: at e2e/utils/testRail.js:49:25
Creating a new Run in TestRail has failed with the following error
{}
detox[7183] ERROR: [DetoxExportWrapper.js/DETOX_INIT_ERROR]
{ DetoxRuntimeError: Aborted detox.init() execution, and now running detox.cleanup()
HINT: Most likely, your test runner is tearing down the suite due to the timeout error
at Detox.[_assertNoPendingInit] (/home/fundbox/mobileNative/node_modules/detox/src/Detox.js:204:9)
at Detox.beforeEach (/home/fundbox/mobileNative/node_modules/detox/src/Detox.js:111:37)
at DetoxExportWrapper.(anonymous function).args [as beforeEach] (/home/fundbox/mobileNative/node_modules/detox/src/DetoxExportWrapper.js:87:32)
at DetoxAdapterImpl.beforeEach (/home/fundbox/mobileNative/node_modules/detox/runners/jest/DetoxAdapterImpl.js:28:22)
at process._tickCallback (internal/process/next_tick.js:68:7) name: 'DetoxRuntimeError' }
然而,当我运行手动安装命令时它成功了。 time
命令显示安装耗时1m51s安装:
$ time /opt/android-sdk/platform-tools/adb -s emulator-5554 shell "pm install -r -g -t /data/local/tmp/detox/Application.apk"
Success
real 1m51.100s
user 0m0.000s
sys 0m0.000s
有没有办法配置和增加此步骤或全局的超时?
看来我找到地方了。显然,有一个配置超时常量的文件e2e/consts.js
。
以下地方看起来相关:
exports.wait = 2000;
exports.timeout = 30000;
exports.jestTimeout = 120000;
我将 exports.jestTimeout
值更新为更高的值,测试能够通过有问题的步骤。
尝试在云 (AWS) 配置的机器上 运行 测试时,我在应用程序安装过程中遇到超时错误。
带有 --loglevel trace
的输出显示如下:
detox[7183] DEBUG: [exec.js/EXEC_CMD, #16] "/opt/android-sdk/platform-tools/adb" -s emulator-5554 shell "pm install -r -g -t /data/local/tmp/detox/Application.apk"
detox[7183] WARN: at e2e/utils/testRail.js:49:25
Creating a new Run in TestRail has failed with the following error
{}
detox[7183] ERROR: [DetoxExportWrapper.js/DETOX_INIT_ERROR]
{ DetoxRuntimeError: Aborted detox.init() execution, and now running detox.cleanup()
HINT: Most likely, your test runner is tearing down the suite due to the timeout error
at Detox.[_assertNoPendingInit] (/home/fundbox/mobileNative/node_modules/detox/src/Detox.js:204:9)
at Detox.beforeEach (/home/fundbox/mobileNative/node_modules/detox/src/Detox.js:111:37)
at DetoxExportWrapper.(anonymous function).args [as beforeEach] (/home/fundbox/mobileNative/node_modules/detox/src/DetoxExportWrapper.js:87:32)
at DetoxAdapterImpl.beforeEach (/home/fundbox/mobileNative/node_modules/detox/runners/jest/DetoxAdapterImpl.js:28:22)
at process._tickCallback (internal/process/next_tick.js:68:7) name: 'DetoxRuntimeError' }
然而,当我运行手动安装命令时它成功了。 time
命令显示安装耗时1m51s安装:
$ time /opt/android-sdk/platform-tools/adb -s emulator-5554 shell "pm install -r -g -t /data/local/tmp/detox/Application.apk"
Success
real 1m51.100s
user 0m0.000s
sys 0m0.000s
有没有办法配置和增加此步骤或全局的超时?
看来我找到地方了。显然,有一个配置超时常量的文件e2e/consts.js
。
以下地方看起来相关:
exports.wait = 2000;
exports.timeout = 30000;
exports.jestTimeout = 120000;
我将 exports.jestTimeout
值更新为更高的值,测试能够通过有问题的步骤。